On 2005-08-19 David Muszynski wrote:
> On Aug 19, 2005, at 4:11 PM, Rodriguez, Ricardo wrote:
>> Does anyone know a script I can use to delete items from the users
>> documents folder ? I want to be able to totally wipe it out every
>> Tuesday. Im running 10.3.9 and I know I can delete the folder easily
>> using rm -rf ~/documents but I prefer to just delete the content only
>> since the folder does not recreate it self on login.
>
> rm -rf ~/documents/* <-- Will this not work?
It should. However, I noticed that sometimes '~' will not resolve to the
user's home when used in scripts, so I would recommend using "$HOME"
instead. And '*' will ignore dot-files. Try something like this:
rm -rf $HOME/Documents/*
rm -rf $HOME/Documents/.[^.]*
Regards
Ansgar Wiechers
--
"Another option [for defragmentation] is to back up your important files,
erase the hard disk, then reinstall Mac OS X and your backed up files."
--http://docs.info.apple.com/article.html?artnum=25668
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/client-management/email@hidden
This email sent to email@hidden