Difference between revisions of "Linux: find: manual"

From OnnoWiki
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 133: Line 133:
  
 
  -inum n
 
  -inum n
    File has inode number n.
+
  File mempunyai inode number n.
  
 
  -ipath pattern
 
  -ipath pattern
    Like -path, but the match is case insensitive.
+
  Seperti -path, tapi match-nya tidak peka huruf besar.
  
 
  -iregex pattern
 
  -iregex pattern
    Like -regex, but the match is case insensitive.
+
  Seperti -regex, tapi match-nya tidak peka huruf besar.
  
 
  -links n
 
  -links n
    File has n links.
+
  File mempunyai n link.
  
 
  -lname pattern
 
  -lname pattern
    File is a symbolic link whose contents match shell pattern pattern. The metacharacters do not treat `/' or `.' specially.
+
  File adalah symbolic link yang isinya cocok dengan pola shell pattern. Metacharacter tidak akan memproses terutama '/' or '.'
  
 
  -mmin n
 
  -mmin n
    File's data was last modified n minutes ago.
+
  File data di modifikasi terakhir n menit yang lalu.
  
 
  -mtime n
 
  -mtime n
    File's data was last modified n*24 hours ago.
+
  File data di modifikasi terakhir n*24 jam yang lalu.
  
 
  -name pattern
 
  -name pattern
    Base of file name (the path with the leading directories removed) matches shell patternpattern. The metacharacters (`*', `?', and `[]') do not match a `.' at the start of the base name. To ignore a directory and the files under it, use -prune; see an example in the description of -path.
+
  Berbasis nama file (path dengan direktori terdepan dihapus) cocok dengan pola shell pattern.
 +
  Metakarakter (*, ?, dan [] ) tidak cocok dengan '.' di awal nama dasar. Untuk mengabaikan sebuah direktori
 +
  dan file-file di bawahnya, gunakan -prune; Lihat contoh dalam uraian -path.
  
 
  -newer file
 
  -newer file
    File was modified more recently than file. -newer is affected by -follow only if -follow comes before -newer on the command line.
+
  File dimodifikasi lebih baru dari file. -newer terpengaruh oleh -follow hanya jika -follow sebelum -newer pada baris perintah.
  
 
  -nouser
 
  -nouser
    No user corresponds to file's numeric user ID.
+
  Tidak ada pengguna yang sesuai dengan ID pengguna numerik pengguna.
  
 
  -nogroup
 
  -nogroup
    No group corresponds to file's numeric group ID.
+
  Tidak ada grup yang sesuai dengan ID grup numerik file.
  
 
  -path pattern
 
  -path pattern
 
+
  Nama file cocok dengan pola shell pattern. Metakarakter tidak memproses khususnya '/' atau '.' ; Jadi, misalnya,
File name matches shell pattern pattern. The metacharacters do not treat `/' or `.' specially; so, for example,  
+
 
+
    find . -path './sr*sc'  
find . -path './sr*sc'  
+
 
+
  Akan mencetak sebuah entri untuk sebuah direktori yang disebut './src/misc' (jika ada).
will print an entry for a directory called './src/misc' (if one exists). To ignore a whole directory tree, use -prune rather than checking every file in the tree. For example, to skip the directory `src/emacs' and all files and directories under it, and print the names of the other files found, do something like this:  
+
  Untuk mengabaikan keseluruhan pohon direktori, gunakan -prune daripada memeriksa setiap file di pohon.
 
+
  Misalnya, untuk melewatkan direktori 'src / emacs' dan semua file dan direktori di bawahnya,
find . -path './src/emacs' -prune -o -print  
+
  dan mencetak nama file lain yang ditemukan, lakukan sesuatu seperti ini:  
 +
 +
    find . -path './src/emacs' -prune -o -print  
  
 
  -perm mode
 
  -perm mode
    File's permission bits are exactly mode (octal or symbolic). Symbolic modes use mode 0 as a point of departure.
+
  Bit file permission adalah sama persis dengan mode (oktal atau simbolis). Mode simbolis menggunakan mode 0 sebagai titik tolak.
  
 
  -perm -mode
 
  -perm -mode
    All of the permission bits mode are set for the file.
+
  Semua mode bit permission diset untuk file.
  
 
  -perm +mode
 
  -perm +mode
    Any of the permission bits mode are set for the file.
+
  Salah satu mode bit permission ditetapkan untuk file.
  
 
  -regex pattern
 
  -regex pattern
    File name matches regular expression pattern. This is a match on the whole path, not a search. For example, to match a file named `./fubar3', you can use the regular expression `.*bar.' or `.*b.*3', but not `b.*r3'.
+
  Nama file cocok dengan pola ekspresi reguler. Ini adalah match di keseluruhan path, bukan pencarian.
 +
  Misalnya, untuk mencocokkan sebuah file bernama './fubar3', anda dapat menggunakan regular expression
 +
  '.*bar.' atau '.*b.*3', tapi tidak 'b.*r3'.
  
 
  -size n[bckw]
 
  -size n[bckw]
    File uses n units of space. The units are 512-byte blocks by default or if `b' follows n, bytes if `c' follows n, kilobytes if `k' follows n, or 2-byte words if `w' follows n. The size does not count indirect blocks, but it does count blocks in sparse files that are not actually allocated.
+
  File menggunakan n unit space. Unit adalah blok 512 byte secara default atau jika 'b' mengikuti n,
 +
  byte jika 'c' mengikuti n, kilobyte jika 'k' mengikuti n, atau 2 byte word jika` w' mengikuti n.
 +
  Ukuran tidak menghitung blok indirect, tapi menghitung blok dalam file sparse yang sebenarnya tidak dialokasikan.
  
 
  -true
 
  -true
    Always true.
+
  Selalu true.
  
 
  -type c
 
  -type c
  File is of type c:
+
  Type file adalah c:
 
+
  b - block (buffered) special
  b
+
  c - character (unbuffered) special
    block (buffered) special
+
  d - directory
 
+
  p - named pipe (FIFO)
  c
+
  f - file biasa
    character (unbuffered) special
+
  l - symbolic link
 
+
  s - socket
  d
+
  D - door (Solaris)
    directory
 
 
 
  p
 
    named pipe (FIFO)
 
 
 
  f
 
    regular file
 
 
 
  l
 
    symbolic link
 
 
 
  s
 
    socket
 
 
 
  D
 
    door (Solaris)
 
  
 
  -uid n
 
  -uid n
    File's numeric user ID is n.
+
  Numerik user ID file adalah n.
  
 
  -used n
 
  -used n
    File was last accessed n days after its status was last changed.
+
  File terakhir akses n hari setelah status terakhir di ubah.
  
 
  -user uname
 
  -user uname
    File is owned by user uname (numeric user ID allowed).
+
  File di miliki oleh user uname (numeric user ID di ijinkan).
  
 
  -xtype c
 
  -xtype c
    The same as -type unless the file is a symbolic link. For symbolic links: if -follow has not been given, true if the file is a link to a file of type c; if -follow has been given, true if c is `l'. In other words, for symbolic links, -xtype checks the type of the file that -type does not check.
+
  Sama seperti -type kecuali file adalah symbolic link. Untuk link simbolis: jika -follow belum diberikan,
 +
  true jika file tersebut adalah link ke file tipe c; Jika -follow telah diberikan, true jika c adalah 'l'.
 +
  Dengan kata lain, untuk tautan simbolik, -xtype memeriksa jenis file yang -type tidak cek.
  
 
==ACTION==
 
==ACTION==
  
 
  -exec command ;
 
  -exec command ;
 
+
  Jalankan perintah; true jika status 0 dikembalikan Semua argumen berikut untuk menemukan dianggap
Execute command; true if 0 status is returned. All following arguments to find are taken to be arguments to the command until an argument consisting of `;' is encountered. The string `{}' is replaced by the current file name being processed everywhere it occurs in the arguments to the command, not just in arguments where it is alone, as in some versions of find. Both of these constructions might need to be escaped (with a `\') or quoted to protect them from expansion by the shell. The command is executed in the starting directory.
+
  sebagai argumen pada perintah sampai sebuah argumen yang terdiri dari ';' ditemui. String `{}'
 +
  digantikan oleh nama file yang saat ini diproses dalam argumen pada perintah, tidak hanya dalam
 +
  argumen tapi di mana saja, seperti pada beberapa versi pencarian. Kedua konstruksi ini mungkin
 +
  perlu escape (dengan '\') atau dikutip untuk melindungi mereka dari ekspansi oleh shell.
 +
  Perintah dijalankan di direktori awal.
  
 
  -fls file
 
  -fls file
 
+
  True; seperti -ls menulis ke file seperti -fprint.
True; like -ls but write to file like -fprint.
 
  
 
  -fprint file
 
  -fprint file
 
+
  True; print full file name ke file file. Jika file tidak ada, jika find di jalankan, dia akan membuat sendiri;
True; print the full file name into file file. If file does not exist when find is run, it is created; if it does exist, it is truncated. The file names ``/dev/stdout'' and ``/dev/stderr'' are handled specially; they refer to the standard output and standard error output, respectively.
+
  jika ada, itu akan di ambil. File name "/dev/stdout" dan "/dev/stderr" akan di tangani secara khusus;
 +
  mereka mengacu pada standard output dan standard error output.
  
 
  -fprint0 file
 
  -fprint0 file
 
+
  True; seperti -print0 tapi menulis ke file seperti -fprint.
True; like -print0 but write to file like -fprint.
 
  
 
  -fprintf file format
 
  -fprintf file format
 
+
  True; seperti -printf tapi menulis ke file seperti -fprint.
True; like -printf but write to file like -fprint.
 
  
 
  -ok command ;
 
  -ok command ;
 
+
  seperti -exec tapi akan bertanya ke user (di standard input); jika responds tidak start dengan 'y' atau 'Y',
Like -exec but ask the user first (on the standard input); if the response does not start with `y' or `Y', do not run the command, and return false.
+
  jangan jalankan command, dan kembalikan false.
  
 
  -print
 
  -print
 
+
  True; print nama file lengkap pada output standar, diikuti dengan baris baru.
True; print the full file name on the standard output, followed by a newline.
 
  
 
  -print0
 
  -print0
 
+
  True; print nama file lengkap pada output standar, diikuti dengan karakter null.
True; print the full file name on the standard output, followed by a null character. This allows file names that contain newlines to be correctly interpreted by programs that process the find output.
+
  Ini memungkinkan nama file yang berisi baris baru untuk ditafsirkan dengan benar oleh program yang memproses keluaran pencarian.
  
 
  -printf format
 
  -printf format
 +
  True; format print pada output standar, menafsirkan perintah escape '\' dan arahan '%' .
 +
  Lebar kolom dan presisi dapat ditentukan seperti fungsi 'printf' C. Tidak seperti -print,
 +
  -printf tidak menambahkan baris baru di akhir string. Escape dan arahannya adalah:
 +
    \a  - Alarm bell.
 +
    \b  - Backspace.
 +
    \c  - Stop printing from this format immediately and flush the output.
 +
    \f  - Form feed.
 +
    \n  - Newline.
 +
    \r  - Carriage return.
 +
    \t  - Horizontal tab.
 +
    \v  - Vertical tab.
 +
    \\  - A literal backslash (`\').
 +
    \NNN - The character whose ASCII code is NNN (octal).
  
True; print format on the standard output, interpreting `\' escapes and `%' directives. Field widths and precisions can be specified as with the `printf' C function. Unlike -print, -printf does not add a newline at the end of the string. The escapes and directives are:
+
Karakter `\ 'diikuti karakter lain diperlakukan sebagai karakter biasa, jadi keduanya dicetak.
 
 
\a
 
 
 
Alarm bell.
 
 
 
\b
 
 
 
Backspace.
 
 
 
\c
 
 
 
Stop printing from this format immediately and flush the output.
 
 
 
\f
 
 
 
Form feed.
 
 
 
\n
 
 
 
Newline.
 
 
 
\r
 
 
 
Carriage return.
 
 
 
\t
 
 
 
Horizontal tab.
 
 
 
\v
 
 
 
Vertical tab.
 
 
 
\\
 
 
 
A literal backslash (`\').
 
 
 
\NNN
 
 
 
The character whose ASCII code is NNN (octal).
 
 
 
A `\' character followed by any other character is treated as an ordinary character, so they both are printed.
 
 
 
%%
 
 
 
A literal percent sign.
 
 
 
%a
 
 
 
File's last access time in the format returned by the C `ctime' function.
 
 
 
%Ak
 
 
 
File's last access time in the format specified by k, which is either `@' or a directive for the C `strftime' function. The possible values for k are listed below; some of them might not be available on all systems, due to differences in `strftime' between systems.
 
 
 
@
 
 
 
seconds since Jan. 1, 1970, 00:00 GMT.
 
 
 
Time fields:
 
 
 
H
 
 
 
hour (00..23)
 
 
 
I
 
 
 
hour (01..12)
 
 
 
k
 
 
 
hour ( 0..23)
 
 
 
l
 
 
 
hour ( 1..12)
 
 
 
M
 
 
 
minute (00..59)
 
 
 
p
 
 
 
locale's AM or PM
 
 
 
r
 
 
 
time, 12-hour (hh:mm:ss [AP]M)
 
 
 
S
 
 
 
second (00..61)
 
 
 
T
 
 
 
time, 24-hour (hh:mm:ss)
 
 
 
X
 
 
 
locale's time representation (H:M:S)
 
 
 
Z
 
 
 
time zone (e.g., EDT), or nothing if no time zone is determinable
 
 
 
Date fields:
 
 
 
a
 
 
 
locale's abbreviated weekday name (Sun..Sat)
 
 
 
A
 
 
 
locale's full weekday name, variable length (Sunday..Saturday)
 
 
 
b
 
 
 
locale's abbreviated month name (Jan..Dec)
 
 
 
B
 
 
 
locale's full month name, variable length (January..December)
 
 
 
c
 
 
 
locale's date and time (Sat Nov 04 12:02:33 EST 1989)
 
 
 
d
 
 
 
day of month (01..31)
 
 
 
D
 
 
 
date (mm/dd/yy)
 
 
 
h
 
 
 
same as b
 
 
 
j
 
 
 
day of year (001..366)
 
 
 
m
 
 
 
month (01..12)
 
 
 
U
 
 
 
week number of year with Sunday as first day of week (00..53)
 
 
 
w
 
 
 
day of week (0..6)
 
 
 
W
 
 
 
week number of year with Monday as first day of week (00..53)
 
 
 
x
 
 
 
locale's date representation (mm/dd/yy)
 
 
 
y
 
 
 
last two digits of year (00..99)
 
 
 
Y
 
 
 
year (1970...)
 
 
 
%b
 
 
 
File's size in 512-byte blocks (rounded up).
 
 
 
%c
 
 
 
File's last status change time in the format returned by the C `ctime' function.
 
 
 
%Ck
 
 
 
File's last status change time in the format specified by k, which is the same as for %A.
 
 
 
%d
 
 
 
File's depth in the directory tree; 0 means the file is a command line argument.
 
 
 
%f
 
 
 
File's name with any leading directories removed (only the last element).
 
 
 
%F
 
 
 
Type of the filesystem the file is on; this value can be used for -fstype.
 
 
 
%g
 
 
 
File's group name, or numeric group ID if the group has no name.
 
 
 
%G
 
 
 
File's numeric group ID.
 
 
 
%h
 
 
 
Leading directories of file's name (all but the last element).
 
 
 
%H
 
 
 
Command line argument under which file was found.
 
 
 
%i
 
 
 
File's inode number (in decimal).
 
 
 
%k
 
 
 
File's size in 1K blocks (rounded up).
 
 
 
%l
 
 
 
Object of symbolic link (empty string if file is not a symbolic link).
 
 
 
%m
 
 
 
File's permission bits (in octal).
 
 
 
%n
 
 
 
Number of hard links to file.
 
 
 
%p
 
 
 
File's name.
 
 
 
%P
 
 
 
File's name with the name of the command line argument under which it was found removed.
 
 
 
%s
 
 
 
File's size in bytes.
 
 
 
%t
 
 
 
File's last modification time in the format returned by the C `ctime' function.
 
 
 
%Tk
 
 
 
File's last modification time in the format specified by k, which is the same as for %A.
 
 
 
%u
 
  
File's user name, or numeric user ID if the user has no name.
+
    %%  - Tanda persen literal.
 +
    %a  - Waktu akses terakhir file dalam format yang dikembalikan oleh fungsi C `ctime '.
 +
    %Ak  - Waktu akses terakhir file dalam format yang ditentukan oleh k, yang merupakan perintah '@'
 +
            atau direktif untuk fungsi C` strftime'. Nilai yang mungkin untuk k tercantum di bawah ini;
 +
            Beberapa di antaranya mungkin tidak tersedia di semua sistem, karena perbedaan `strftime 'antar sistem.
  
%U
+
            @ seconds since Jan. 1, 1970, 00:00 GMT.
 +
           
 +
            Time fields:
 +
            H  - hour (00..23)
 +
            I  - hour (01..12)
 +
            k  - hour ( 0..23)
 +
            l  - hour ( 1..12)
 +
            M  - minute (00..59)
 +
            p  - locale's AM or PM
 +
            r  - time, 12-hour (hh:mm:ss [AP]M)
 +
            S  - second (00..61)
 +
            T  - time, 24-hour (hh:mm:ss)
 +
            X  - locale's time representation (H:M:S)
 +
            Z  - time zone (e.g., EDT), or nothing if no time zone is determinable
 +
           
 +
            Date fields:
 +
            a  - locale's abbreviated weekday name (Sun..Sat)
 +
            A  - locale's full weekday name, variable length (Sunday..Saturday)
 +
            b  - locale's abbreviated month name (Jan..Dec)
 +
            B  - locale's full month name, variable length (January..December)
 +
            c  - locale's date and time (Sat Nov 04 12:02:33 EST 1989)
 +
            d  - day of month (01..31)
 +
            D  - date (mm/dd/yy)
 +
            h  - same as b
 +
            j  - day of year (001..366)
 +
            m  - month (01..12)
 +
            U  - week number of year with Sunday as first day of week (00..53)
 +
            w  - day of week (0..6)
 +
            W  - week number of year with Monday as first day of week (00..53)
 +
            x  - locale's date representation (mm/dd/yy)
 +
            y  - last two digits of year (00..99)
 +
            Y  - year (1970...)
 +
            %b  - File's size in 512-byte blocks (rounded up).
 +
            %c  - File's last status change time in the format returned by the C `ctime' function.
 +
            %Ck - File's last status change time in the format specified by k, which is the same as for %A.
 +
            %d  - File's depth in the directory tree; 0 means the file is a command line argument.
 +
            %f  - File's name with any leading directories removed (only the last element).
 +
            %F  - Type of the filesystem the file is on; this value can be used for -fstype.
 +
            %g  - File's group name, or numeric group ID if the group has no name.
 +
            %G  - File's numeric group ID.
 +
            %h  - Leading directories of file's name (all but the last element).
 +
            %H  - Command line argument under which file was found.
 +
            %i  - File's inode number (in decimal).
 +
            %k  - File's size in 1K blocks (rounded up).
 +
            %l  - Object of symbolic link (empty string if file is not a symbolic link).
 +
            %m  - File's permission bits (in octal).
 +
            %n  - Number of hard links to file.
 +
            %p  - File's name.
 +
            %P  - File's name with the name of the command line argument under which it was found removed.
 +
            %s  - File's size in bytes.
 +
            %t  - File's last modification time in the format returned by the C `ctime' function.
 +
            %Tk - File's last modification time in the format specified by k, which is the same as for %A.
 +
            %u  - File's user name, or numeric user ID if the user has no name.
 +
            %U - File's numeric user ID.
  
File's numeric user ID.
+
Karakter `% 'diikuti karakter lain akan dibuang (tapi karakter lainnya dicetak).
 
 
A `%' character followed by any other character is discarded (but the other character is printed).
 
  
 
  -prune
 
  -prune
 
+
  Jika -depth tidak diberikan, true; Jangan turun direktori saat ini
If -depth is not given, true; do not descend the current directory.
+
  Jika -depth diberikan, true; tidak berpengaruh.
If -depth is given, false; no effect.
 
  
 
  -ls
 
  -ls
 +
  True; daftar file saat ini dalam format `ls -dils 'pada output standar.
 +
  Jumlah blok adalah blok 1K, kecuali variabel lingkungan POSIXLY_CORRECT telah diatur, dalam hal ini blok 512 byte digunakan.
  
True; list current file in `ls -dils' format on standard output. The block counts are of 1K blocks, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
+
==OPERATOR==
 
 
==OPERATORS==
 
 
 
Listed in order of decreasing precedence:
 
 
 
( expr )
 
 
 
Force precedence.
 
 
 
! expr
 
 
 
True if expr is false.
 
 
 
-not expr
 
 
 
Same as ! expr.
 
  
expr1 expr2
+
Tercantum dalam urutan penurunan yang didahulukan:
  
And (implied); expr2 is not evaluated if expr1 is false.
+
( expr )
 +
Force precedence.
  
expr1 -a expr2
+
! expr
 +
True jika expr adalah false.
  
Same as expr1 expr2.
+
-not expr
 +
Sama dengan ! expr.
  
expr1 -and expr2
+
expr1 expr2
 +
And (implied); expr2 tidak di evaluasi jika expr1 adalah false.
  
Same as expr1 expr2.
+
expr1 -a expr2
 +
Sama dengan expr1 expr2.
  
expr1 -o expr2
+
expr1 -and expr2
 +
Sama dengan expr1 expr2.
  
Or; expr2 is not evaluated if expr1 is true.
+
expr1 -o expr2
 +
Or; expr2 tidak di evaluasi jika expr1 adalah true.
  
expr1 -or expr2
+
expr1 -or expr2
 +
Sama dengan expr1 -o expr2.
  
Same as expr1 -o expr2.
+
expr1 , expr2
 +
List; keduanya expr1 an expr2 selalu di evaluasi. Nilai expr1 di abaikan; nilai dari list adalah nilai dari expr2.
  
expr1 , expr2
+
==CONTOH==
 
 
List; both expr1 and expr2 are always evaluated. The value of expr1 is discarded; the value of the list is the value of expr2.
 
 
 
==EXAMPLES==
 
  
 
  find /home -user joe
 
  find /home -user joe
  
Find every file under the directory /home owned by the user joe.
+
Temukan setiap file dibawah direktori / home yang dimiliki oleh pengguna joe.
  
 
  find /usr -name *stat
 
  find /usr -name *stat
  
Find every file under the directory /usr ending in ".stat".
+
Temukan setiap file di bawah direktori / usr yang diakhiri dengan ".stat".
  
 
  find /var/spool -mtime +60
 
  find /var/spool -mtime +60
  
Find every file under the directory /var/spool that was modified more than 60 days ago.
+
Temukan setiap file dibawah direktori /var/spool yang sudah dimodifikasi lebih dari 60 hari yang lalu.
  
 
  find /tmp -name core -type f -print | xargs /bin/rm -f
 
  find /tmp -name core -type f -print | xargs /bin/rm -f
  
Find files named core in or below the directory /tmp and delete them. Note that this will work incorrectly if there are any filenames containing newlines, single or double quotes, or spaces.
+
Temukan file bernama inti di dalam atau di bawah direktori /tmp dan hapuslah. Perhatikan bahwa ini akan bekerja dengan tidak benar jika ada nama file yang berisi baris baru, tanda kutip tunggal atau ganda, atau spasi.
  
 
  find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f
 
  find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f
  
Find files named core in or below the directory /tmp and delete them, processing filenames in such a way that file or directory names containing single or double quotes, spaces or newlines are correctly handled. The -name test comes before the -type test in order to avoid having to call stat(2) on every file.
+
Temukan file bernama inti di dalam atau di bawah direktori / tmp dan hapuslah, memproses nama file sedemikian rupa sehingga nama file atau direktori yang berisi tanda kutip tunggal atau ganda, spasi atau baris baru ditangani dengan benar. Uji nama-datang sebelum tes tipe agar tidak memanggil stat (2) pada setiap file.
  
 
  find . -type f -exec file '{}' \;
 
  find . -type f -exec file '{}' \;
  
Runs `file' on every file in or below the current directory. Notice that the braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation. The semicolon is similarly protected by the use of a backslash, though ';' could have been used in that case also.
+
Run 'file' pada setiap file di dalam atau di bawah direktori saat ini. Perhatikan bahwa kawat gigi dilipat dalam tanda kutip tunggal untuk melindungi mereka dari interpretasi sebagai tanda baca skrip shell. Titik koma sama-sama dilindungi oleh penggunaan garis miring terbalik, meskipun ';' Bisa juga digunakan dalam kasus itu juga.
  
 
  find /      \( -perm -4000 -fprintf /root/suid.txt '%#m %u %p\n' \) , \
 
  find /      \( -perm -4000 -fprintf /root/suid.txt '%#m %u %p\n' \) , \
 
               \( -size +100M -fprintf /root/big.txt  '%-10s %p\n' \)
 
               \( -size +100M -fprintf /root/big.txt  '%-10s %p\n' \)
  
Traverse the filesystem just once, listing setuid files and directories into /root/suid.txt and large files into /root/big.txt.
+
Lewati filesystem sekali saja, cantumkan file dan direktori setuid ke file /root/suid.txt dan besar ke /root/big.txt.
  
 
  find $HOME  -mtime 0
 
  find $HOME  -mtime 0
  
Search for files in your home directory which have been modified in the last twenty-four hours. This command works this way because the time since each file was last modified is divided by 24 hours and any remainder is discarded. That means that to match -mtime
+
Cari file di direktori home anda yang telah dimodifikasi dalam dua puluh empat jam terakhir. Perintah ini bekerja seperti ini karena waktu sejak setiap file terakhir diubah dibagi 24 jam dan sisanya dibuang. Itu berarti untuk mencocokkan - mtime 0, file harus memiliki modifikasi di masa lalu yang kurang dari 24 jam yang lalu.
 
 
0, a file will have to have a modification in the past which is less than 24 hours ago.
 
  
 
  find . -perm 664
 
  find . -perm 664
  
Search for files which have read and write permission for their owner, and group, but which other users can read but not write to. Files which meet these criteria but have other permissions bits set (for example if someone can execute the file) will not be matched.
+
Cari file yang telah membaca dan menulis izin untuk pemiliknya, dan kelompoknya, namun pengguna lain dapat membaca tapi tidak menulisnya. File yang memenuhi kriteria ini namun memiliki bit perizinan lainnya yang ditetapkan (misalnya jika seseorang dapat mengeksekusi file) tidak akan cocok.
  
 
  find . -perm -664
 
  find . -perm -664
  
Search for files which have read and write permission for their owner and group, and which other users can read, without regard to the presence of any extra permission bits (for example the executable bit). This will match a file which has mode 0777, for example.
+
Cari file yang telah membaca dan menulis izin untuk pemilik dan grup mereka, dan pengguna lain dapat membaca, tanpa memperhatikan adanya bit izin tambahan (misalnya bit yang dapat dieksekusi). Ini akan cocok dengan file yang memiliki mode 0777, misalnya.
  
 
  find . -perm /222
 
  find . -perm /222
  
Search for files which are writable by somebody (their owner, or their group, or anybody else).
+
Cari file yang bisa ditulis oleh seseorang (owner, atau grup, atau other).
  
 
  find . -perm /220
 
  find . -perm /220
Line 632: Line 431:
 
  find . -perm /u=w,g=w
 
  find . -perm /u=w,g=w
  
All three of these commands do the same thing, but the first one uses the octal representation of the file mode, and the other two use the symbolic form. These commands all search for files which are writable by either their owner or their group. The files don't have to be writable by both the owner and group to be matched; either will do.
+
Ketiga perintah ini melakukan hal yang sama, tapi yang pertama menggunakan representasi oktal dari mode file, dan dua lainnya menggunakan bentuk simbolis. Perintah ini semua mencari file yang bisa ditulis oleh pemiliknya atau grup mereka. File tidak harus dapat ditulis oleh pemilik dan kelompok yang akan dicocokkan; semua bisa melakukannya
  
 
  find . -perm -220
 
  find . -perm -220
 
  find . -perm -g+w,u+w
 
  find . -perm -g+w,u+w
  
Both these commands do the same thing; search for files which are writable by both their owner and their group.
+
Kedua perintah ini melakukan hal yang sama; Cari file yang bisa ditulis oleh pemilik dan grup mereka.
  
 
  find . -perm -444 -perm /222 ! -perm /111
 
  find . -perm -444 -perm /222 ! -perm /111
 
  find . -perm -a+r -perm /a+w ! -perm /a+x
 
  find . -perm -a+r -perm /a+w ! -perm /a+x
  
These two commands both search for files that are readable for everybody (-perm -444 or -perm -a+r), have at least on write bit set (-perm /222 or -perm /a+w) but are not executable for anybody (! -perm /111 and ! -perm /a+x respectively)
+
Kedua perintah ini mencari file yang mudah dibaca untuk semua orang (-perm -444 or -perm -a+r), setidaknya memiliki set bit tulis (-perm /222 or -perm /a+w) namun tidak dapat dieksekusi Untuk siapa saja (! -perm /111 and ! -perm /a+x)
 
 
Important: Use the man command (% man) to see how a command is used on your particular computer.
 
  
 +
Penting: Gunakan perintah man (% man) untuk melihat bagaimana sebuah perintah digunakan pada komputer anda.
  
 
==Referensi==
 
==Referensi==
  
 
* https://www.lifewire.com/find-linux-command-4092587
 
* https://www.lifewire.com/find-linux-command-4092587

Latest revision as of 05:32, 21 June 2017

sumber: https://www.lifewire.com/find-linux-command-4092587


NAME

find - Cari file dalam hirarki direktori


locate(1L), locatedb(5L), updatedb(1L), xargs(1L)

SYNOPSIS

find [path...] [expression]

PENJELASAN

Halaman manual ini mendokumentasikan versi penemuan GNU. find melakukan pencarian pada pohon direktori yang berakar pada setiap nama file yang diberikan dengan mengevaluasi ekspresi yang diberikan dari kiri ke kanan, sesuai dengan aturan yang didahulukan (lihat bagian OPERATOR), sampai hasilnya diketahui (sisi kiri salah dan operasi, true untuk operasi or), pada saat mana menemukan pindah ke nama file berikutnya.

Argumen pertama yang dimulai dengan `- ',` (', `) ',`,', or `! ' Diambil untuk menjadi awal dari ungkapan; Setiap argumen sebelum itu adalah jalur untuk pencarian, dan argumen apapun setelah itu adalah sisa dari ekspresi. Jika tidak ada jalur yang diberikan, direktori saat ini digunakan. Jika tidak ada ekspresi yang diberikan, ekspresi `-print 'digunakan.

Keluaran find dengan status 0 jika semua file berhasil diproses, lebih besar dari 0 jika terjadi kesalahan.

EXPRESSION

Expression terdiri dari option (yang mempengaruhi keseluruhan operasi daripada pemrosesan file tertentu, dan selalu kembali true), test (yang mengembalikan nilai true atau false), dan action (yang memiliki efek samping dan mengembalikan true atau false), semuanya dipisahkan oleh operator. -and diasumsikan di mana operator dihilangkan. Jika ungkapan tidak mengandung action selain -prune, -print dilakukan pada semua file yang expression-nya true.

OPTIONS

Semua options selalu kembali true.

Mereka selalu berefek, bukan diproses hanya jika ekspresinya tercapai. Oleh karena itu, untuk kejelasan, yang terbaik adalah menempatkannya di awal expression.

-daystart
 Mengukur waktu (untuk -amin, -atime, -cmin, -ctime, -mmin, & -mtime) mulai dari awal hari ini dari pada dari 24 jam yang lalu.
-depth
 Proses setiap isi direktori sebelum direktori itu sendiri.
-follow
 Mereferensi Link simbolis. Berlaku -noleaf.
-help, --help
 Cetak ringkasan penggunaan baris perintah untuk find dan keluar.
-maxdepth levels
 Turunkan pada tingkat paling rendah (bilangan bulat non-negatif) dari direktori di bawah argumen baris perintah.
 "-maxdepth 0" berarti hanya menerapkan tes dan tindakan pada argumen baris perintah.
-mindepth levels
 Jangan menerapkan test atau action pada tingkat yang kurang dari tingkat (bilangan bulat non-negatif).
 "-mindepth 1" berarti memproses semua file kecuali argumen baris perintah.
-mount
 Jangan turunkan direktori pada filesystem lain.
 Nama alternatif untuk -xdev, untuk kompatibilitas dengan beberapa versi find lainnya.
-noleaf
 Jangan optimalkan dengan mengasumsikan bahwa direktori berisi lebih sedikit subdirektori
 daripada jumlah hard link-nya. Pilihan ini diperlukan saat mencari filesystem yang tidak
 mengikuti konvensi direktori-link Unix, seperti filesystem CD-ROM atau MS-DOS atau mount
 point AFS. Setiap direktori pada filesystem Unix normal memiliki setidaknya 2 hard link:
 namanya dan '.' Selain itu, subdirektorinya (jika ada) masing-masing memiliki entri '..'
 yang terhubung ke direktori tersebut. Saat menemukan adalah memeriksa sebuah direktori,
 setelah memasang subdirektori 2 lebih sedikit dari jumlah link direktori, ia mengetahui
 bahwa sisa entri dalam direktori adalah direktori non-direktori (file 'leaf' di pohon direktori).
 
 Jika hanya nama file yang perlu diperiksa, tidak perlu stat mereka; Hal ini memberikan
 peningkatan kecepatan pencarian yang signifikan.
-version, --version
 Cetak nomor versi find dan keluar.
-xdev
 Jangan turunkan direktori pada filesystem lain.

TEST

Argumen numerik dapat ditentukan sebagai

+n
 Untuk lebih besar dari n
-n
 Untuk kurang dari dari n
n
 Untuk persis sama dengan n.
-amin n
 File terakhir akses n menit yang lalu.
-anewer file
 File terakhir diakses lebih baru dari file yang telah dimodifikasi.
 -anewer dipengaruhi oleh -follow hanya jika-ikuti sebelum -anewer pada baris perintah.
-atime n
 File terakhir diakses n * 24 jam yang lalu.
-cmin n
 Status file terakhir diubah n menit yang lalu.
-cnewer file
 Status file terakhir diubah lebih baru dari file yang telah dimodifikasi.
 -cnewer terpengaruh oleh -follow hanya jika sebelum -cnewer pada baris perintah.
-ctime n
 Status file terakhir diubah n * 24 jam yang lalu.
-empty
 File kosong dan merupakan file biasa atau direktori.
-false
 Selalu false.
-fstype type
 File ada di jenis filesystem type. Jenis filesystem yang valid berbeda di antara berbagai versi Unix;
 daftar tidak lengkap jenis filesystem yang diterima pada beberapa versi Unix atau yang lainnya adalah:
 ufs, 4.2, 4.3, nfs, tmp, mfs, S51K, S52K. Anda bisa menggunakan -printf dengan direktif % F untuk
 melihat jenis filesystem anda.
-gid n
 ID grup numerik file adalah n.
-group gname
 File milik grup gname (ID grup numerik diperbolehkan).
-ilname pattern
 Seperti -lname, tapi match-nya tidak peka huruf besar.
-iname pattern
 Seperti -nama, tapi match-nya tidak peka huruf besar. Misalnya, pola 'fo*' dan 'F ??'
 Cocok dengan nama file 'Foo', 'FOO', 'foo', 'fOo', dll.
-inum n
 File mempunyai inode number n.
-ipath pattern
 Seperti -path, tapi match-nya tidak peka huruf besar.
-iregex pattern
 Seperti -regex, tapi match-nya tidak peka huruf besar.
-links n
 File mempunyai n link.
-lname pattern
 File adalah symbolic link yang isinya cocok dengan pola shell pattern. Metacharacter tidak akan memproses terutama '/' or '.'
-mmin n
 File data di modifikasi terakhir n menit yang lalu.
-mtime n
 File data di modifikasi terakhir n*24 jam yang lalu.
-name pattern
 Berbasis nama file (path dengan direktori terdepan dihapus) cocok dengan pola shell pattern.
 Metakarakter (*, ?, dan [] ) tidak cocok dengan '.' di awal nama dasar. Untuk mengabaikan sebuah direktori
 dan file-file di bawahnya, gunakan -prune; Lihat contoh dalam uraian -path.
-newer file
 File dimodifikasi lebih baru dari file. -newer terpengaruh oleh -follow hanya jika -follow sebelum -newer  pada baris perintah.
-nouser
 Tidak ada pengguna yang sesuai dengan ID pengguna numerik pengguna.
-nogroup
 Tidak ada grup yang sesuai dengan ID grup numerik file.
-path pattern
 Nama file cocok dengan pola shell pattern. Metakarakter tidak memproses khususnya '/' atau '.' ; Jadi, misalnya,

   find . -path './sr*sc' 

 Akan mencetak sebuah entri untuk sebuah direktori yang disebut './src/misc' (jika ada).
 Untuk mengabaikan keseluruhan pohon direktori, gunakan -prune daripada memeriksa setiap file di pohon.
 Misalnya, untuk melewatkan direktori 'src / emacs'  dan semua file dan direktori di bawahnya,
 dan mencetak nama file lain yang ditemukan, lakukan sesuatu seperti ini: 

   find . -path './src/emacs' -prune -o -print 
-perm mode
 Bit file permission adalah sama persis dengan mode (oktal atau simbolis). Mode simbolis menggunakan mode 0 sebagai titik tolak.
-perm -mode
 Semua mode bit permission diset untuk file.
-perm +mode
 Salah satu mode bit permission ditetapkan untuk file.
-regex pattern
 Nama file cocok dengan pola ekspresi reguler. Ini adalah match di keseluruhan path, bukan pencarian.
 Misalnya, untuk mencocokkan sebuah file bernama './fubar3', anda dapat menggunakan regular expression
 '.*bar.' atau '.*b.*3', tapi tidak 'b.*r3'.
-size n[bckw]
 File menggunakan n unit space. Unit adalah blok 512 byte secara default atau jika 'b' mengikuti n,
 byte jika 'c' mengikuti n, kilobyte jika 'k' mengikuti n, atau 2 byte word jika` w' mengikuti n.
 Ukuran tidak menghitung blok indirect, tapi menghitung blok dalam file sparse yang sebenarnya tidak dialokasikan.
-true
 Selalu true.
-type c
 Type file adalah c:
 b  - block (buffered) special
 c  - character (unbuffered) special
 d  - directory
 p  - named pipe (FIFO)
 f  - file biasa
 l  - symbolic link
 s  - socket
 D  - door (Solaris)
-uid n
 Numerik user ID file adalah n.
-used n
 File terakhir akses n hari setelah status terakhir di ubah.
-user uname
 File di miliki oleh user uname (numeric user ID di ijinkan).
-xtype c
 Sama seperti -type kecuali file adalah symbolic link. Untuk link simbolis: jika -follow belum diberikan,
 true jika file tersebut adalah link ke file tipe c; Jika -follow telah diberikan, true jika c adalah 'l'.
 Dengan kata lain, untuk tautan simbolik, -xtype memeriksa jenis file yang -type tidak cek.

ACTION

-exec command ;
 Jalankan perintah; true jika status 0 dikembalikan Semua argumen berikut untuk menemukan dianggap
 sebagai argumen pada perintah sampai sebuah argumen yang terdiri dari ';' ditemui. String `{}'
 digantikan oleh nama file yang saat ini diproses dalam argumen pada perintah, tidak hanya dalam
 argumen tapi di mana saja, seperti pada beberapa versi pencarian. Kedua konstruksi ini mungkin
 perlu escape (dengan '\') atau dikutip untuk melindungi mereka dari ekspansi oleh shell.
 Perintah dijalankan di direktori awal.
-fls file
 True; seperti -ls menulis ke file seperti -fprint.
-fprint file
 True; print full file name ke file file. Jika file tidak ada, jika find di jalankan, dia akan membuat sendiri;
 jika ada, itu akan di ambil. File name "/dev/stdout" dan "/dev/stderr" akan di tangani secara khusus;
 mereka mengacu pada standard output dan standard error output.
-fprint0 file
 True; seperti -print0 tapi menulis ke file seperti -fprint.
-fprintf file format
 True; seperti -printf tapi menulis ke file seperti -fprint.
-ok command ;
 seperti -exec tapi akan bertanya ke user (di standard input); jika responds tidak start dengan 'y' atau 'Y',
 jangan jalankan command, dan kembalikan false.
-print
 True; print nama file lengkap pada output standar, diikuti dengan baris baru.
-print0
 True; print nama file lengkap pada output standar, diikuti dengan karakter null.
 Ini memungkinkan nama file yang berisi baris baru untuk ditafsirkan dengan benar oleh program yang memproses keluaran pencarian.
-printf format
 True; format print pada output standar, menafsirkan perintah escape '\' dan arahan '%' .
 Lebar kolom dan presisi dapat ditentukan seperti fungsi 'printf' C. Tidak seperti -print,
 -printf tidak menambahkan baris baru di akhir string. Escape dan arahannya adalah:
    \a   - Alarm bell.
    \b   - Backspace.
    \c   - Stop printing from this format immediately and flush the output.
    \f   - Form feed.
    \n   - Newline.
    \r   - Carriage return.
    \t   - Horizontal tab.
    \v   - Vertical tab.
    \\   - A literal backslash (`\').
    \NNN - The character whose ASCII code is NNN (octal).

Karakter `\ 'diikuti karakter lain diperlakukan sebagai karakter biasa, jadi keduanya dicetak.

    %%   - Tanda persen literal.
    %a   - Waktu akses terakhir file dalam format yang dikembalikan oleh fungsi C `ctime '.
    %Ak  - Waktu akses terakhir file dalam format yang ditentukan oleh k, yang merupakan perintah '@'
           atau direktif untuk fungsi C` strftime'. Nilai yang mungkin untuk k tercantum di bawah ini;
           Beberapa di antaranya mungkin tidak tersedia di semua sistem, karena perbedaan `strftime 'antar sistem.
           @ seconds since Jan. 1, 1970, 00:00 GMT.
           
           Time fields:
           H   - hour (00..23)
           I   - hour (01..12)
           k   - hour ( 0..23)
           l   - hour ( 1..12)
           M   - minute (00..59)
           p   - locale's AM or PM
           r   - time, 12-hour (hh:mm:ss [AP]M)
           S   - second (00..61)
           T   - time, 24-hour (hh:mm:ss)
           X   - locale's time representation (H:M:S)
           Z   - time zone (e.g., EDT), or nothing if no time zone is determinable
           
           Date fields:
           a   - locale's abbreviated weekday name (Sun..Sat)
           A   - locale's full weekday name, variable length (Sunday..Saturday)
           b   - locale's abbreviated month name (Jan..Dec)
           B   - locale's full month name, variable length (January..December)
           c   - locale's date and time (Sat Nov 04 12:02:33 EST 1989)
           d   - day of month (01..31)
           D   - date (mm/dd/yy)
           h   - same as b
           j   - day of year (001..366)
           m   - month (01..12)
           U   - week number of year with Sunday as first day of week (00..53)
           w   - day of week (0..6)
           W   - week number of year with Monday as first day of week (00..53)
           x   - locale's date representation (mm/dd/yy)
           y   - last two digits of year (00..99)
           Y   - year (1970...)
           %b  - File's size in 512-byte blocks (rounded up).
           %c  - File's last status change time in the format returned by the C `ctime' function.
           %Ck - File's last status change time in the format specified by k, which is the same as for %A.
           %d  - File's depth in the directory tree; 0 means the file is a command line argument.
           %f  - File's name with any leading directories removed (only the last element).
           %F  - Type of the filesystem the file is on; this value can be used for -fstype.
           %g  - File's group name, or numeric group ID if the group has no name.
           %G  - File's numeric group ID.
           %h  - Leading directories of file's name (all but the last element).
           %H  - Command line argument under which file was found.
           %i  - File's inode number (in decimal).
           %k  - File's size in 1K blocks (rounded up).
           %l  - Object of symbolic link (empty string if file is not a symbolic link).
           %m  - File's permission bits (in octal).
           %n  - Number of hard links to file.
           %p  - File's name.
           %P  - File's name with the name of the command line argument under which it was found removed.
           %s  - File's size in bytes.
           %t  - File's last modification time in the format returned by the C `ctime' function.
           %Tk - File's last modification time in the format specified by k, which is the same as for %A.
           %u  - File's user name, or numeric user ID if the user has no name.
           %U  - File's numeric user ID.

Karakter `% 'diikuti karakter lain akan dibuang (tapi karakter lainnya dicetak).

-prune
 Jika -depth tidak diberikan, true; Jangan turun direktori saat ini
 Jika -depth diberikan, true; tidak berpengaruh.
-ls
 True; daftar file saat ini dalam format `ls -dils 'pada output standar.
 Jumlah blok adalah blok 1K, kecuali variabel lingkungan POSIXLY_CORRECT telah diatur, dalam hal ini blok 512 byte digunakan.

OPERATOR

Tercantum dalam urutan penurunan yang didahulukan:

( expr )
Force precedence.
! expr
True jika expr adalah false.
-not expr
Sama dengan ! expr.
expr1 expr2
And (implied); expr2 tidak di evaluasi jika expr1 adalah false.
expr1 -a expr2
Sama dengan expr1 expr2.
expr1 -and expr2
Sama dengan expr1 expr2.
expr1 -o expr2
Or; expr2 tidak di evaluasi jika expr1 adalah true.
expr1 -or expr2
Sama dengan expr1 -o expr2.
expr1 , expr2
List; keduanya expr1 an expr2 selalu di evaluasi. Nilai expr1 di abaikan; nilai dari list adalah nilai dari expr2.

CONTOH

find /home -user joe

Temukan setiap file dibawah direktori / home yang dimiliki oleh pengguna joe.

find /usr -name *stat

Temukan setiap file di bawah direktori / usr yang diakhiri dengan ".stat".

find /var/spool -mtime +60

Temukan setiap file dibawah direktori /var/spool yang sudah dimodifikasi lebih dari 60 hari yang lalu.

find /tmp -name core -type f -print | xargs /bin/rm -f

Temukan file bernama inti di dalam atau di bawah direktori /tmp dan hapuslah. Perhatikan bahwa ini akan bekerja dengan tidak benar jika ada nama file yang berisi baris baru, tanda kutip tunggal atau ganda, atau spasi.

find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f

Temukan file bernama inti di dalam atau di bawah direktori / tmp dan hapuslah, memproses nama file sedemikian rupa sehingga nama file atau direktori yang berisi tanda kutip tunggal atau ganda, spasi atau baris baru ditangani dengan benar. Uji nama-datang sebelum tes tipe agar tidak memanggil stat (2) pada setiap file.

find . -type f -exec file '{}' \;

Run 'file' pada setiap file di dalam atau di bawah direktori saat ini. Perhatikan bahwa kawat gigi dilipat dalam tanda kutip tunggal untuk melindungi mereka dari interpretasi sebagai tanda baca skrip shell. Titik koma sama-sama dilindungi oleh penggunaan garis miring terbalik, meskipun ';' Bisa juga digunakan dalam kasus itu juga.

find /       \( -perm -4000 -fprintf /root/suid.txt '%#m %u %p\n' \) , \
             \( -size +100M -fprintf /root/big.txt  '%-10s %p\n' \)

Lewati filesystem sekali saja, cantumkan file dan direktori setuid ke file /root/suid.txt dan besar ke /root/big.txt.

find $HOME  -mtime 0

Cari file di direktori home anda yang telah dimodifikasi dalam dua puluh empat jam terakhir. Perintah ini bekerja seperti ini karena waktu sejak setiap file terakhir diubah dibagi 24 jam dan sisanya dibuang. Itu berarti untuk mencocokkan - mtime 0, file harus memiliki modifikasi di masa lalu yang kurang dari 24 jam yang lalu.

find . -perm 664

Cari file yang telah membaca dan menulis izin untuk pemiliknya, dan kelompoknya, namun pengguna lain dapat membaca tapi tidak menulisnya. File yang memenuhi kriteria ini namun memiliki bit perizinan lainnya yang ditetapkan (misalnya jika seseorang dapat mengeksekusi file) tidak akan cocok.

find . -perm -664

Cari file yang telah membaca dan menulis izin untuk pemilik dan grup mereka, dan pengguna lain dapat membaca, tanpa memperhatikan adanya bit izin tambahan (misalnya bit yang dapat dieksekusi). Ini akan cocok dengan file yang memiliki mode 0777, misalnya.

find . -perm /222

Cari file yang bisa ditulis oleh seseorang (owner, atau grup, atau other).

find . -perm /220
find . -perm /u+w,g+w
find . -perm /u=w,g=w

Ketiga perintah ini melakukan hal yang sama, tapi yang pertama menggunakan representasi oktal dari mode file, dan dua lainnya menggunakan bentuk simbolis. Perintah ini semua mencari file yang bisa ditulis oleh pemiliknya atau grup mereka. File tidak harus dapat ditulis oleh pemilik dan kelompok yang akan dicocokkan; semua bisa melakukannya

find . -perm -220
find . -perm -g+w,u+w

Kedua perintah ini melakukan hal yang sama; Cari file yang bisa ditulis oleh pemilik dan grup mereka.

find . -perm -444 -perm /222 ! -perm /111
find . -perm -a+r -perm /a+w ! -perm /a+x

Kedua perintah ini mencari file yang mudah dibaca untuk semua orang (-perm -444 or -perm -a+r), setidaknya memiliki set bit tulis (-perm /222 or -perm /a+w) namun tidak dapat dieksekusi Untuk siapa saja (! -perm /111 and ! -perm /a+x)

Penting: Gunakan perintah man (% man) untuk melihat bagaimana sebuah perintah digunakan pada komputer anda.

Referensi