Hola !
On Fri, Jul 22, 2005 at 10:08:36AM +1200, John Carter wrote:
> I have heard many cries about the lack of a recycle bin in Linux.
>
> Just remember that if you want to get rid of things for ever, you use "rm".
> "rm" means I want it dead, gone, never to plague me again...
>
> "mv" means move. Move the files from here to there, move it to the recycle
> bin, wherever you want it moved, "mv" will move it.
>
> So it's easy.
> cd ~
> mkdir trash
> mv Junk trash
I'd change it to something like this as a "safe rm" :
#!/bin/bash
TRASHDIR=~/trash/
if [ ! -d $TRASHDIR ]; then
mkdir $TRASHDIR
fi
for A in $*; do
if [ -d $A ]; then
echo "Can't remove directory: $A"
else
mv $A $TRASHDIR
fi
done
############
Also you could add something to your crontab or just an "cleantrash"
that has something like "find ~/trash/ -type f -mtime 20 -exec rm -f {}
\;"
> To see how full your disk is...
> df -h
>
> To see which file / directory is hogging your disk...
> du -akx /path/to/disk | sort -n > hogs
> less hogs
I think that " du -h / |grep -v '/.*/' " would be more comfortable to
read.
Regards,
--
Matías Rollán
<[EMAIL PROTECTED]>