Misalnya:
$ namei test/test1.txt
Keluaran:
f:nama jalur
d:direktori
-:nama file
Deskripsi singkat
DESKRIPSI atas
<strong>namei </strong>interprets its arguments as pathnames to any type of Unix
file (symlinks, files, directories, and so forth). <strong>namei </strong>then
follows each pathname until an endpoint is found (a file, a
directory, a device node, etc). If it finds a symbolic link, it
shows the link, and starts following it, indenting the output to
show the context.
This program is useful for finding "too many levels of symbolic
links" problems.
For each line of output, <strong>namei </strong>uses the following characters to
identify the file type found:
f: = the pathname currently being resolved
d = directory
l = symbolic link (both the link and its contents are output)
s = socket
b = block device
c = character device
p = FIFO (named pipe)
- = regular file
? = an error of some kind
<strong>namei </strong>prints an informative message when the maximum number of
symbolic links this system can have has been exceeded.
Code language: HTML, XML (xml)
Menggunakan perintah namei
1. Sejajarkan dengan margin kiri (menggunakan opsi -v)
$ namei -v test/test1.txt
Keluaran:
2. Tampilkan pemilik dan grup (menggunakan opsi -o)
$ namei -o test/test1.txt
Keluaran:
Ini membuktikan bahwa folder dan file ini sama-sama dimiliki oleh ubuntu.
3. Tampilkan daftar panjang (menggunakan opsi -l)
$ namei -l test/test1.txt
Keluaran:
Dengan opsi ini, itu akan menunjukkan lebih banyak hak istimewa dari pemiliknya.
Jika Anda hanya ingin menunjukkan hak istimewa pemiliknya, mari gunakan opsi -m:
$ namei -m test/test1.txt
Keluaran:
Kesimpulan
Kami baru saja mengajari Anda untuk menggunakan perintah namei di Linux.
Artikel menarik lainnya mungkin:Cara Mudah Menginstal FortiClient VPN
Cara Sederhana Untuk Memeriksa Versi Driver NVIDIA di Linux
Cara sederhana untuk memahami perintah IOStat