How To Locate Or Find Files By Owner In Linux Shell Command Finding Files By Owner

Mobile
feeds
Welcome Login | Register

How To Locate Or Find Files By Owner In Linux Shell Command Finding Files By Owner
  Forums Index
      » Linux Forums
        » » how to locate or find files by owner in linux shell command finding files by owner



How To Locate Or Find Files By Owner In Linux Shell Command Finding Files By Owner
Post Description:
Post Tags: how, to, locate, or, find, files, by, owner, in, linux, shell, command, finding, files, by, owner, linux, linux support, linux questions, linux server, programming, assistance, questions, answers, tech, it, unix
This Post Has Been Viewed 2288 Times Since Thu May 03, 2007 7:57 pm Posted By linux with 0 replies
Next Post »» how to transfer files to and from media transfering data cdrom floppy drives
How To Locate Or Find Files By Owner In Linux Shell Command Finding Files By Owner
locating files by owner, the find utitiy is used to locate files based on a variety of criteri. determine whether you have a directory in /tmp anmed the same as your user login name for example, run this command:

Command
ls -ld /tmp/$USER


if a long listing for your direcotyr in /tmp is displayed, make sure the permissions allow you to rwx the direcotyr. if you do not have a directory in /tmp of your login anme, create one with this command:

Command
mkdir /tmp/$USER


and copy three more of your files ot he directory you created in /tmp with this command:

Command
cp any_file another_file 3rd_file /tmp/$USER


now lets looks for some files, this is the command you could use to find files by the owner since in this example, i will be looking for my own files ($USER)

Command
find /tmp -user $USER -print


EXPLANATION OF COMMANDS
COMMAND DESCRIPTION
findinstructs the shell to execute the find utility, which searches a target directory and all of its sbudirectories.
/tmpthis first argument to find instrucs find to start its search in the /tmp direcoty and search all directories below that.
-useran option to find, instructin it to search for files by owner, not by name or any other criteria.
$USERthis argument directly follows the user agrument and is interpreted by find to be the user whose files should be located. the shell replaces $USER with your login anme. all files belonging to this user in the directory tree starting at /tmp are located
-printspecifies that the full pathname of each occurence of the files matching the selection criterion should be oupt. in addition to pringint, find can be instructed to remove located files, change file permisions, or emply essentially any shell file-manipulation command



Leave Your Comments






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About How To Locate Or Find Files By Owner In Linux Shell Command Finding Files By Owner




(0) Comments