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
(written 2008-05-22 06:47:06)
Associated topics are indexed under
A161 - Web Application Deployment - Users and Groups [2639] su or su - ... what is the difference? - (2010-02-17)
[2491] Root is root for a reason! - (2009-11-03)
[2301] Mistaken identity? - (2009-07-22)
[2203] Always use su with minus. And where do programs come from? - (2009-05-27)
[2117] Choosing a railway station fairly in PHP - (2009-04-04)
[2103] Ask the Tutor - Open Source forum - (2009-03-25)
[1904] Ruby, Perl, Linux, MySQL - some training notes - (2008-11-23)
[1902] sstrwxrwxrwx - Unix and Linux file permissions - (2008-11-23)
[1773] The Longest Possible Day - (2008-08-26)
[1619] User and Group settings for Apache httpd web server - (2008-04-22)
[1592] Setting up a new user - Linux or Unix - (2008-03-26)
[683] Supporting users on Linux and Unix - (2006-04-13)
[431] File permissions of Linux and Unix systems - (2005-08-31)
[409] Functions and commands with dangerous names - (2005-08-11)
Some other Articles
The old sayings are the best (FSB)How do Google Ads work?Old Sarum airfield brings back fond memoriesls command - favourite optionsLooking for files with certain characteristics (Linux / Unix)Easy conversion - image formats, currencies and distancesThe tourists guide to LinuxExchange Rates - PHP with your prices in your users currencyUsing cookies and sessions to connect different URLs - PHPSeeing how others do it - PHP training