Deleting contents of ~/.local/share/Trash/expunged .....?

1,690

Files can be stuck in ~/.local/share/Trash/expunged when you delete from Nautilus a folder that belongs to you, but contains files which are belong to another user, and it is tricky for Nautilus to handle this situation correctly. To delete them try to use:

sudo -i
rm -rv /home/<your_username>/.local/share/Trash/expunged/*
exit
Share:
1,690

Related videos on Youtube

McJohnson
Author by

McJohnson

Updated on September 18, 2022

Comments

  • McJohnson
    McJohnson over 1 year

    I was just testing and fiddling around with security stuff when I noticed that I cannot get a result from the following:

    <?php echo shell_exec('history'); ?>
    

    The same refers to:

    <?php echo shell_exec('fc -l 1'); ?>
    

    Both have been tried with 2>&1 at the end but after all - history is not a command. Tried under CLI as well:

    php -r "echo shell_exec('fc -l 1');"
    

    which does not return anything. Has been attempted with system() and exec() also (=does not return a result). In the same time:

    • I can execute both history and fc -l 1 via SSH;
    • I can execute other commands such as ls via PHP (shell_exec() both on web and in CLI);
    • I am running the same user;
    • history and fc -l 1 do return results;
    • CerebralFart
      CerebralFart over 8 years
      Are you absolutely sure it's the same user? try whoami both ways to make sure.
    • McJohnson
      McJohnson over 8 years
      Yes, it is the same user. Did confirm this with whoami.
    • CerebralFart
      CerebralFart over 8 years
      Okay, then I don't know, sorry
    • Barmar
      Barmar over 8 years
      shell_exec runs Bourne Shell. history and fc are extensions in bash.
  • McJohnson
    McJohnson over 8 years
    I just tried it. Returns NULL. Could you verify it's working on your end?
  • Barmar
    Barmar over 8 years
    Like I wrote, non-interactive shells don't keep history. So why would you expect it to return anything?
  • Barmar
    Barmar over 8 years
    This just prevents it from getting an error saying that the command is not found.
  • McJohnson
    McJohnson over 8 years
    Oh, I get it. Should read up more on the topic. Thank you for your time and answer :)