ls -r -R komanda Linux

Ls -r opcijas karodziņā faili / direktoriji tiek uzskaitīti apgrieztā secībā.

ls -R opcijas karodziņā rekursīvi uzskaitīts direktoriju koks.


ls -r

Ls -r opcijas karodziņā faili / direktoriji tiek uzskaitīti apgrieztā secībā.

Sintakse

$ ls -r [options] [file|dir]

Piemēri

Noklusējuma saraksts:

$ ls
Desktop   Downloads Pictures Templates Videos
Documents Music     Public   todo.txt
$

 

Saraksts apgrieztā secībā:

$ ls -r
Videos   Templates Pictures Downloads Desktop
todo.txt Public    Music    Documents
$

 

Garš saraksta formāts apgrieztā secībā:

$ ls -lr
total 4
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Videos
-rw-r--r-- 1 user user 131 2011-08-17 18:07 todo.txt
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Templates
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Public
drwxr-xr-x 2 user user 120 2011-08-17 18:14 Pictures
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Music
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Downloads
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Documents
drwxr-xr-x 2 user user  80 2011-08-17 16:52 Desktop
$

Gara saraksta formāts, sakārtots pēc datuma / laika apgrieztā secībā:

$ ls -ltr
total 4
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Videos
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Templates
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Public
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Music
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Downloads
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Documents
drwxr-xr-x 2 user user  80 2011-08-17 16:52 Desktop
-rw-r--r-- 1 user user 131 2011-08-17 18:07 todo.txt
drwxr-xr-x 2 user user 120 2011-08-17 18:14 Pictures
$

 


ls -R

ls -R opcijas karodziņā rekursīvi uzskaitīts direktoriju koks.

Sintakse

$ ls -R [options] [file|dir]

Piemēri

Rekursīvs saraksts:

$ ls -R
.:
Desktop   Downloads Pictures Templates Videos
Documents Music     Public   todo.txt

./Desktop:
examples.desktop ubiquity-gtkui.desktop

./Documents:

./Downloads:

./Music:

./Pictures:
ls-a.png ls-full-path.png ls-l.png ls-s.png

./Public:

./Templates:

./Videos:
$

 

Garš saraksta formāts ar rekursīvu sarakstu:

$ ls -lR
.:
total 4
drwxr-xr-x 2 user user  80 2011-08-17 16:52 Desktop
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Documents
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Downloads
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Music
drwxr-xr-x 2 user user 120 2011-08-17 18:14 Pictures
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Public
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Templates
-rw-r--r-- 1 user user 131 2011-08-17 18:07 todo.txt
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Videos

./Desktop:
total 12
-rwxr-xr-x 1 user user  203 2011-08-17 16:52 examples.desktop
-rwxr-xr-x 1 user user 7672 2011-08-17 16:19 ubiquity-gtkui.desktop

./Documents:
total 0

./Downloads:
total 0

./Music:
total 0

./Pictures:
total 556
-rw-r--r-- 1 user user  94114 2011-08-17 18:13 ls-a.png
-rw-r--r-- 1 user user 254129 2011-08-17 18:14 ls-full-path.png
-rw-r--r-- 1 user user 102761 2011-08-17 18:13 ls-l.png
-rw-r--r-- 1 user user  77374 2011-08-17 18:12 ls-s.png

./Public:
total 0

./Templates:
total 0

./Videos:
total 0
$

 


Skatīt arī

Advertising

LS KOMANDA
ĀTRAS TABULAS