Help - Search - Members - Calendar
Full Version: Deleting Files By Username
Linuxhelp > Support > Technical Support
I'm sure it can be done, but I'm new to Linux!

I want to delete a load of files in /tmp directory which have been created by a user - how do I do this?

I've looked in man for rm but cannot find much in there.
for x in `find /tmp -user your_user`
rm -rf $x

You can do that in the terminal, or in a bash script.
Thanks for that.

I've found that 'find -user 'user_name' -exec rm -rf {} /; -print' seems to work for the mo.

The foward slash is actually a backslash but for some reason this NG won't allow a backslash.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.