Linux ls Poloaiga - Lisi Faila

O le ls faʻatonuga lisiina mea o se faʻamatalaga faʻapitoa. I lenei tulaga matou te faʻamatalaina uma filifiliga avanoa mo le ls faʻatonuga.

ls Commad Filifiliga






































































Filifiliga Faʻamatalaga
-o Lisi uma mea na tusia e aofia ai ma mea e amata ile togi
-TO Lisi uma faamaumauga aofia ai. ma ..
-c Faʻavasega faila ile suiga ole taimi
-d Lisi faamaumauga o lisi
-h Faʻaalia le lapoʻa i le tagata e mafai ona faitauina (faʻapea K, M)
-H Tutusa i luga naʻo malosiʻaga o le 1000 ae le o le 1024
-l Faʻaali mataupu i se lisi umi-lisi
-pe Lisi lisi umi e aunoa ma faʻamatalaga a vaega
-R Faʻaali mataupu i le faʻasologa saʻo
-s Lolomi tele o faila taitasi i poloka
-S Faʻavasega i le faila tele
- faʻavasega Faʻavasega mataupu i se upu (ie tele, faʻamatalaga, tulaga)
- Faʻavasega e ala i taimi faʻavasega
-u Faʻavasega i le taimi avanoa mulimuli
-v Faʻavasega i lea lomiga
-1 Lisi tasi faila i le laina

Lisi Faila

O le ls faʻatonuga lisiina mea o se faʻamatalaga faʻapitoa, le aofia ai togitogi. Afai e leai se faʻasino igoa e faʻamaotiina mai lea taimi, i le tulaga faʻaletonu, o mea o loʻo iai nei o le lisi lisi.

Lisi faila e faʻavasega faʻasologa mataʻitusi, e ala i le le masani ai, ma faʻafetaui i koluma pe a fai latou te le ofi i luga o le tasi laina.

Faʻataʻitaʻiga:

$ ls apt
configs
Documents
Music
workspace bin
Desktop
git

Pictures Public
Videos

Lisi Faila i se Long Listing Format

O le ls faʻatonuga -l filifiliga lolomiina se faʻamatalaga faʻapitoa mea i totonu o se umi lisi lisi. Afai e leai se faʻasino igoa e faʻamaotiina mai lea taimi, i le tulaga faʻaletonu, o mea o loʻo iai nei o le lisi lisi.

ls -l /etc

Faʻataʻitaʻiga Galuega:



total 1204 drwxr-xr-x 3 root root 4096 Apr 21 03:44 acpi -rw-r--r-- 1 root root 3028 Apr 21 03:38 adduser.conf drwxr-xr-x 2 root root 4096 Jun 11 20:42 alternatives ...

Lisi mai Faila e sefulu talu ai nei ona fesuiaʻi

Ole mea o loʻo mulimuli mai o le a lisiina atu i le sefulu o faila sili ona lata mai ua toe teuteuina i le taimi nei faʻatonutonu, e faʻaaoga ai le umi lisi lisi (-l) ma faʻavasega e le taimi (-t)

ls -lt | head

Lisi Uma Faila aofia ai Dotfiles

O le togi o se faila o ona igoa amata i le .. Nei e masani ona nana e ls ma le lisiina seʻi vagana ua talosagaina. Mo se faʻataʻitaʻiga o mea nei o ls o le a le lisiina le togiina faila:

$ ls bin pki

O le -a poʻo --all filifiliga o le a lisi uma faila, e aofia ai dotfiles.

Faʻataʻitaʻiga:

$ ls -a . .ansible
.bash_logout .bashrc .. .bash_history .bash_profile bin
pki

Lisi Faila i se Laʻau-Pei Faʻatusa

O le laau faʻatonuga lisiina mea o se faʻapitoa faʻasinoala i se laʻau-pei faʻatulaga. Afai e leai se faʻasino igoa e faʻamaotiina mai lea taimi, i le tulaga faʻaletonu, o mea o loʻo iai nei o le lisi lisi.

Faʻataʻitaʻiga Galuega:

$ tree /tmp /tmp ├── 5037 ├── adb.log └── evince-20965
└── image.FPWTJY.png

Faʻaoga le laau faʻatonuga's -L filifiliga e faʻatapulaʻa le loloto o faʻaaliga ma le -d filifiliga e naʻo lisi lisi o tusi.

Faʻataʻitaʻiga Galuega:

$ tree -L 1 -d /tmp /tmp └── evince-20965

Lisi Faila faʻavasega i le tele

O le ls faʻatonuga -S Filifiliga e faʻavasega faila i le faʻasologa o le faila.

$ ls -l -S ./Fruits total 8 -rw-rw-rw- 1 root root 166703 Jan 28 00:09 apples.jpg -rw-rw-rw- 1 root root 134270 Jan 28 00:09 kiwis.jpg -rw-rw-rw- 1 root root 30134 Jan 28 00:09 bananas.jpg

A faʻaaoga i le -r Filifili ua faʻaleaogaina le faʻavasega.

$ ls -l -S -r ./Fruits total 8 -rw-rw-rw- 1 root root 30134 Jan 28 00:09 bananas.jpg -rw-rw-rw- 1 root root 134270 Jan 28 00:09 kiwis.jpg -rw-rw-rw- 1 root root 166703 Jan 28 00:09 apples.jpg

Faaiuga

I lenei tulaga na matou aʻoaʻoina ai filifiliga eseese uma e lisi ai faila e faʻaaoga ai le ls faʻatonuga.