Simple explanation Prints the time it took to execute a command whatis time(1) - time command execution —help None man man 1 time Usage ===== time executable - Time the execution of the program executable time -p executable - Time the execution of the program executable and print in POSIX.2 format
Simple explanation Show all available commands, aliases and functions whatis compgen [builtins] (1) - bash built-in commands, see bash(1) help compgen: usage: compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word] man man 1 bash Usage How are we going to create a list of commands for ‘Command of the Day’? Compgen! compgen -a: List of user aliases -b: List of built-in shell commands -c: List of all commands you can run -e: List of shell variables -k: List of built-in shell keywords -A function: List of available bash functions Tip Create an alias for compgen to show all functions: alias compgen=‘compgen -abckA function’. This will print in list format including all aliases, built-ins, commands and functions available References https://www.cyberciti.biz/open-source/command-line-hacks/compgen-linux-command/ http://unix.stackexchange.com/questions/151118/understand-compgen-builtin-command
There are lots of really interesting commands on Unix/ Linux systems that are either poorly documented or are plainly forgotten about. So in an effort to educate myself and others, I thought I would try and do a command of the day. I’ll aim to do 5 posts a week, sometimes I’ll grep a couple of commands in to one post if they’re related.