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 counted 57 options for ls. The combinations generated for that is a lot more than any user is going to want to read through.
Taking 57 as the number of available options, there are 395,010 possible ls commands which use different combinations of any 4 of those options. If you take that to all combinations of 5 options... 4,187,106. Try 7 options, 264,385,836. The list for all possible combinations would be the sum of the sub-combinations from 1 to 57... good luck with that!
The task as stated is simply not a reasonable thing to do. And not all combinations will be valid commands anyway, so the list would be useless without reference to the documentation, i.e. man pages of each base command.
As suggested by others, make a list of man pages and/or provide a synopsis.
Taking 57 as the number of available options, there are 395,010 possible ls commands which use different combinations of any 4 of those options. If you take that to all combinations of 5 options... 4,187,106. Try 7 options, 264,385,836. The list for all possible combinations would be the sum of the sub-combinations from 1 to 57... good luck with that!
The task as stated is simply not a reasonable thing to do. And not all combinations will be valid commands anyway, so the list would be useless without reference to the documentation, i.e. man pages of each base command.
As suggested by others, make a list of man pages and/or provide a synopsis.
Thanks for posting some of the numbers. As far as I can tell, the most manageable would be taking 56 options at a time, which still leaves you with 57 combinations.
EDIT: I was going to post my calculation of combinations for the "cat" command in my previous post, but decided against it. There are 10 total options (not counting --help and --version), but 3 are essentially duplicates. You could take at most 7 at a time out of 10, which still leaves you with 120 possible combinations.
Last edited by individual; 10-05-2018 at 04:48 PM.
The command syntax example in post #1 can be written as a brace expansion which will expand to a list of commands. The brace expansion in the perl bsd_glob version of glob is better for this than the one in bash because bash treats whitespace as a pattern separator. http://perldoc.perl.org/functions/glob.html http://perldoc.perl.org/File/Glob.html
^ i see.
but:
each command belong to a software package and these packages most likely already contain documentation. so that's where you look first.
most likely there's a man page for each command.
or there's something in /usr/share/doc/command_package.
doc stands for documentation.
failing that, the option you're looking for is one of:
Code:
command -h
command --help
man command
# and very rarely
command -?
but still:
i fail to understand why you have to re-create this documentation when it's already there. i think you're just missing something here.
These aren't Linux commands and there isn't any documentation yet (I'm working on it).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.