[Techtalk] Newbie needs advice

Ivy Foster ivy.foster at gmail.com
Sun Nov 30 03:40:31 UTC 2008


On 29 Nov 2008, at  7:10 pm -0800, Sarah Newman wrote:
> Does anyone know of a convenient replacement for 'rm' which isn't so
> immediate (like the windows trash can?)

Well, most of the desktop environments provide trash cans, which is
a nice safety net that's definitely worth taking advantage of. If
you're looking to learn the terminal, one of the first things
I personally always do on a new install is to add the following lines
to my /home/me/.bashrc:

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

All of the `-i's tell the rm, cp, and mv commands (three *very*
important commands!) to ask you before deleting or overwriting a file.
So if you type `rm testfile', it'll ask you whether you really want to
delete it before doing the deed.

> My boyfriend suggests a script and a cron job to delete out old
> files but I bet someone has a better idea.  I did a quick search but
> didn't find anything all that wonderful.

Well, if you're thinking of temporary files, most distributions remove
files from the /tmp directory automagically on reboots. If you have
something in your personal files where you toss temporary junk and
then forget about it when you don't need it anymore, one thing you
could do would be have a cron script that moves them to your .trash/
or whatever. Or that emails you a list of old files to deal with.

I hope that's helpful! Good luck.


                      If I Am Ever A Heroine...
80. When sneaking into the fortress of the Evil Overlord, I will
    disguise myself as someone whose normal behavior I can emulate.

More information about the Techtalk mailing list