I-Linux ls Command-Uluhlu lweefayile

I ls Uluhlu lwemixholo yolawulo oluchaziweyo Kule posi sichaza zonke iinketho ezikhoyo ls umyalelo.



ls Iinketho Commad






































































Khetha Inkcazo
-ukuya Dwelisa onke amangenelo kubandakanya lawo aqala ichaphaza
-O Dwelisa onke amangenelo ngaphandle. kwaye ..
-c Hlela iifayile ngexesha lotshintsho
-d Uluhlu lolawulo olungenisiweyo
-h Bonisa ubungakanani kwifomathi efundekayo yomntu (okt K, M)
-H Kuyafana nangasentla kuphela ngamagunya ayi-1000 endaweni ye-1024
-l Veza imixholo ekuluhlu olude
-okanye Ifomathi yoluhlu olude ngaphandle kolwazi lweqela
-r Bonisa imixholo ngokulandelelana
-s Ubungakanani bokuprinta kwifayile nganye kwiibhloko
-S Hlela ngokobungakanani befayile
–Uhlobo Hlela imixholo ngegama. (okt ubungakanani, uguqulelo, inqanaba)
-t Hlela ngexesha lokulungisa
-u Hlela ngexesha lokugqibela lokufikelela
-v Hlela ngohlobo
-1 Uluhlu lwefayile enye kumgca ngamnye


Uluhlu lweefayile

I ls Uluhlu lwemixholo yolawulo oluchaziweyo, ngaphandle kweefayile. Ukuba akukho sikhombisi sichaziweyo emva koko, ngokungagqibekanga, imixholo yolawulo lwangoku idwelisiwe.

Uluhlu lweefayile luhlelwe ngokwe-alfabhethi, ngokungagqibekanga, kwaye zilungelelaniswe kwiikholamu ukuba azihambelani kumgca omnye.


Umzekelo:

$ ls apt
configs
Documents
Music
workspace bin
Desktop
git

Pictures Public
Videos


Uluhlu lweefayile kuFomelo loLuhlu olude

I ls yomyalelo -l ukhetho lushicilela imixholo yolawulo oluchaziweyo kwifomathi yoluhlu olude. Ukuba akukho sikhombisi sichaziweyo emva koko, ngokungagqibekanga, imixholo yolawulo lwangoku idwelisiwe.


ls -l /etc

Iziphumo zomzekelo:

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 ...

Dwelisa iiFayile eziShumi eziGuqulwe kutshanje

Oku kulandelayo kuya kudwelisa ukuya kuthi ga kwiifayile ezisandula kuguqulwa kulawulo lwangoku, kusetyenziswa ifomathi yoluhlu olude (-l) kwaye ihlelwe ngexesha (-t).

ls -lt | head

Dwelisa zonke iifayile ezibandakanya iifayile

Ifayile ichaphazeleka yifayile enamagama aqala nge- .. Ezi zihlala zifihlwa ngu ls kwaye ayidweliswanga ngaphandle kokuba iceliwe. Umzekelo ezi ziphumo zilandelayo ze ls Andizukudwelisa iifayile ezichokoziweyo:

$ ls bin pki

I -a okanye --all ukhetho luya kudwelisa zonke iifayile, kubandakanya iifayile.


Umzekelo:

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


Uluhlu lweefayile kwifomathi efana noMthi

Umyalelo womthi udwelisa imixholo yolawulo oluchaziweyo kwifomathi efana nomthi. Ukuba akukho sikhombisi sichaziweyo emva koko, ngokungagqibekanga, imixholo yolawulo lwangoku idwelisiwe.

Iziphumo zomzekelo:

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

Sebenzisa umyalelo womthi -L ukhetho lokunciphisa ubunzulu bokubonisa kunye -d Ukhetho lodweliso kuphela.


Iziphumo zomzekelo:

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

Uluhlu lweefayile luhlelwe ngokobungakanani

I ls yomyalelo -S ukhetho luhlela iifayile ngokwehla ngokobungakanani befayile.

$ 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

Xa isetyenziswa kunye -r ukhetho iodolo yokuhlengahlengiswa.

$ 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

Isiphelo

Kule posi sifunde zonke iindlela ezahlukeneyo zoluhlu lweefayile kusetyenziswa ls umyalelo.