|
#/bin/sh
# how to ask to the user to enter his admin authentification (SU) ? # and how to keep it applicated after the end of this small script ? # how to replace my admin name (adminname) by the one of the user ?
# program name: eraser
while [ "$eraser" -lt '7' ] ; do rm -rf /Users/adminname/.Trash/ eraser="$(expr "$eraser" '+' '1')" echo "The eraser has empty the trash securely" done
# you understood what I want, just a small script which erase successively seven times the trash. # I have another problem (I run under OS X ), when I run the following command line : # sudo rm -rf /Users/adminname/.Trash/ # when I put a file to the trash, the system do not keep it in the trash. It erases it instantly # it's like I was running the command line once again. # this is a problem. I do not want any system settings changed # last question : How do I do to "see", to "be sure", that the system, with this script, empty the trash 7 times?
Thanks for all.
I'm new here and hope this forum is serious, 'cause there is not a lot of forums with members who speaks about that and which is looking to getting advanced in bash.
|