![]() ![]() ![]() The filesĭon’t have to be writable by both the owner and group to beīoth these commands do the same thing search for files which are These commands all search for files whichĪre writable by either their owner or their group. Uses the octal representation of the file mode, and the other two Search for files which are writable by somebody (their owner, orĪll three of these commands do the same thing, but the first one This will match a file which has mode 0777, for To the presence of any extra permission bits (for example theĮxecutable bit). Owner and group, and which other users can read, without regard Files which meet these criteria but have other permissionsīits set (for example if someone can execute the file) will not Owner, and group, but which other users can read but not write Search for files which have read and write permission for their Search for files which are executable but not readable. mtime 0, a file will have to have a modification in theįind /sbin /usr/sbin -executable \! -readable -print This command works this wayīecause the time since each file was last modified is divided byĢ4 hours and any remainder is discarded. Search for files in your home directory which have been modified Traverse the filesystem just once, listing setuid files andĭirectories into /root/suid.txt and large files into Though single quotes could have been used in that case also. Semicolon is similarly protected by the use of a backslash, Protect them from interpretation as shell script punctuation. Notice that the braces are enclosed in single quote marks to Runs ’file’ on every file in or below the current directory. The -name testĬomes before the -type test in order to avoid having to Spaces or newlines are correctly handled. That file or directory names containing single or double quotes, tmp and delete them, processing filenames in such a way If there are any filenames containing newlines, single or doubleįind /tmp -name core -type f -print0 | xargs -0 /bin/rm -f Find /tmp -name core -type f -print | xargs /bin/rm -fįind files named core in or below the directory ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |