These commands are useful when working on a Linux Bash environment that I found very useful.
-> ls -d !(*.gz)
If you omit the "-d", it will also show listing of each directory it found.
Or
-> ls -dls !(*.gz)
Where -d would omit deeper traverse into directories
To see only first few results ( say I just want to see latest few files )
-> ls -dls !(*.gz) | tail
If you want to see the same result but ordered by latest modified date:
-> ls -dls !(*,gz) -sort asc | tail
No comments:
Post a Comment