IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Listing commands in Linux

2 posters

Go down

Listing commands in Linux Empty Listing commands in Linux

Post by BIT0104-ANIK Sun Aug 22, 2010 4:55 pm

It's a tips basically.
You can list quite a number of linux commands, as well as some utilities by a command named 'compgen'
try this things... and then apply 'man' on them.

1. "compgen -c" will list all the commands you could run.
2. "compgen -a" will list all the aliases you could run.
3. "compgen -b" will list all the built-ins you could run.
4. "compgen -k" will list all the keywords you could run.
5. "compgen -A function" will list all the functions you could run.
6. "compgen -A function -abck" will list all the above in one go.


I think this should eliminate the overhead of cramming the commands. Just remember this, it remembers for you.
BIT0104-ANIK
BIT0104-ANIK
Administrator
Administrator

Course(s) :
  • BIT

Blood Group : O+
Posts : 423
Points : 699

http://anikstech.blogspot.com

Back to top Go down

Listing commands in Linux Empty Re: Listing commands in Linux

Post by BIT0122-Amit Mon Aug 30, 2010 9:45 pm

nice tips Smile
rep++

here is another tips.

When you use the above mentioned commands, it shows all available commands or aliases alphabetically.
you can try this
Code:
compgen -c a
to list all commands starting with 'a'.
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum