« Easy conversion - image formats, currencies and distances | Main | ls command - favourite options »
May 22, 2008
Looking for files with certain characteristics (Linux / Unix)
I was about to use chown to change the ownership of an entire subdirectory tree that had been passed from one user to another. But - hang on - were there any files there that belonged to someone else for any reason? One way to find out - a find command:
find . -not -user savethetrain -print
"Find all the files in or below the current directory that do not belong to the savethetrain account"
Other options to find include:
-name - look by name
-uid - look by user id
-mtime - look by file modified time
-perms - look by permissions
-size - look by file size
Posted by gje at May 22, 2008 06:47 AM