Just after you type enter, you have 3 seconds to switch window, then "texthere" will be "typed" in the X11 application that has focus. Very useful to beat your score at games such as "How fast can you type A-Z".
This command will format your alias or function to a single line, trimming duplicate white space and newlines and inserting delimiter semi-colons, so it continues to work on a single line. Show Sample Output
Bash builtin type also indents the function. Show Sample Output
Also searches for aliases and shell builtins Show Sample Output
Usefull to detect if a commad that your script relies upon is properly installed in your box, you can use it as a function function is_program_installed() { type "$1" >/dev/null } Invoke it and check the execution code is_program_installed "dialog" if [ ! $? -eq 0 ]; then echo "dialog is not installed" exit 1 fi Show Sample Output
The output will likely point to '/etc/alternatives/java'. So find out where that points by issuing ls -l like this: ls -l /etc/alternatives/java
Prints a string indicating whether a command is an alias, keyword, function, builtin, or file. I have used this in my BASH scripts to allow an external parameter to define which function to run, and ensure that it is a valid function that can indeed be run. Show Sample Output
The "type" builtin command is handy to find out what executable will be used if you issue a command. But on some distros, particularly when using /etc/alternatives, certain executables get buried under layers and layers of symbolic links and it becomes hard to find which one. If you put the above command in your .bashrc, it adds a "-c" option to the type command that will weed through the symbolic links and prints the actual file that will be executed. Show Sample Output
ulimit [-SHacdflmnpstuv [limit]] Provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The -H and -S options specify that the hard or soft limit is set for the given resource. A hard limit cannot be increased once it is set; a soft limit may be increased up to the value of the hard limit. If neither -H nor -S is specified, both the soft and hard limits are set. # jumps straight to the definition of ulimit in the bash man page. Show Sample Output
I find it useful when I want to add another crontab entry and I need to specify the appropriate PATH. I give ''whichpath'' a list of programs that I use inside my script and it gives me the PATH I need to use for this script. ''whichpath'' uses associative array, therefore you should have Bash v4 in order to run it. See sample output. Show Sample Output
This command is used to configure a network connection on RHEL7/Centos7 with: ip4: ip address gw4: gateway if you need to configure DNS for that connection you need to use the command below: nmcli con mod eth0 ipv4.dns " a.a.a.a b.b.b.b " Once it's done you need to bring the connection up: nmcli con up eth0
get desired info from machine and pipe it txt file. Show Sample Output
find all files in cur dir add to url and append to file
Read all chapters up to 'Jumping', improve your effectiveness of wirking in terminal. Most useful are the Moving and Searching commands
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: