Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am confused on something. Lets say that I enter a command of # ls --help
and it echos out this:
sean@thebrains:~$ ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
-b, --escape print octal escapes for nongraphic characters
--block-size=SIZE use SIZE-byte blocks
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last
modification of file status information)
with -l: show ctime and sort by name
otherwise: sort by ctime
-C list entries by columns
--color[=WHEN] control whether color is used to distinguish file
types. WHEN may be `never', `always', or `auto'
-------------------------
Now if you look at the top argument ' -a --all' does the --all mean that, that is the long way to write the argument? Also '-A --almost-all, and the --author, what does that imply, that I need to use:'ls -A --almost-all --author' ??
-a and --all are the same command just two different methods of writing it. The more common practice now adays is to use the "long format" or the --all.
-A, --almost-all do not list implied . and ..
These two statements are also the same see explaniation above HOWEVER they are not the same as "-a --all" I suggest you run the two to see the difference.
You have to read this statement literally: "do not list implied dot and dot dot". This means it does not list the shortcut of the current directory (dot) and the shortcut for the upper level directory (dot dot).
AIUI, the long forms of options are designed mostly for use inside of scripts, where readability (i.e. quickly understanding what the command is doing) is important, and the effort of typing the full string only has to be done once.
For regular command line use, the short forms are more natural.
The "--help" option is usually only used as a quick reference. As mentioned above, read the man or info pages for detailed usage information.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.