how to delete all files in one command for all user
Hi to all.
I setup Mailserver with spamassassin using Maildir format. I want to delete all files under .junkmail dir. The thing is all user has .junkmail dir and i manually delete all the contents per user. Is there a way where I can delete all the files in all directories of .junkmail in all user without doing it maunally? TIA :) |
I never tried it but rm /home/*/.junkmail should work
|
hahahaha why didn't I think of that. Such an idiot I am.
Thx!!!! |
If I read your post correctly, .junkmail ia a directory and you want to remove all files in that directory for all users without removing the directory itself. The command suggested above will not work. Change into the /home directory and issue this command:
Code:
[root@localhost home]# find ./*/.junkmail -type f -exec rm -fr {} \; |
almost
avallach was just missing an asterik
Code:
rm -f /home/*/.junkmail/* |
All times are GMT -5. The time now is 11:36 AM. |