0
votes
1answer
231 views

Sorting with command ls in unix (ksh) [closed]

I'm wondering how does the sort works with ls. For example: ls - lrt tri par date ls - lSr par size, ... However I don't see how this pattern works.
4
votes
4answers
356 views

linux + how to ignore (filter) file with space

Sometimes a file name is created from a couple of names and space between each name as the following: $ touch "A B C" $ ls A B C <-- one file but has three words ! ...
0
votes
1answer
2k views

Must parse ls -Al output and get file or directory name [duplicate]

I must parse ls -Al output and get file or directory name ls -Al output : drwxr-xr-x 12 s162103 studs 12 march 28 2012 personal domain drwxr-xr-x 2 s162103 studs 3 march 28 ...
1
vote
3answers
2k views

output only file names(with spaces) in ls -Al

I should echo only names of files or directories with this construction: ls -Al | while read string do ... done ls -Al output : drwxr-xr-x 12 s162103 studs 12 march 28 12:49 personal ...
2
votes
3answers
828 views

Find directories that do not contain subdirectories

I'm writing script is ksh. Need to find all directory names directly under the current directory which contain only files, not subdirectories. I know that I could use ls -alR and recursively parse ...