Is there any Combination of OPTION possible with ls
which (in UBUNTU 14.04)
For ease, I took below annotation to let you tell the situation
H == Hidden directories (folder) and hidden files (name started with `.`)
lists all but sort H first and then non H, alphanumerically and sort folder before files.
ls -A
is near to my solution . see
But Desktop
breaks the chain
PS: Kindly do not gives the other way hack, like ls (*)
or using grep
. I am only looking for combination of OPTIONS . like ls -ABC
or whatever.
Update
Got answer of my second question . Thanks to Edward.
lists only H alphanumerically and sort folder before files.
ls -Ad .*
is best fit .
I am just answering 2nd part of your question, because 1st part is not possible using just
ls
command.to list only hidden files and only hidden directories sorted in alphanumerically manner. folders will come in alphabetically order(along with files), not before files
-a
gives you all file/directory hidden or not-1
gives you one result per row-d
stopsls
from listing subdirectories and files inside any folder it comes accross.*
wild card allows to list only hidden file/directory