As you know, bash keeps a history of the commands used in your user’s session. But, when you use a command twice (or more), it will be saved with two (or more) entries in the bash history. The best way…
As you know, bash keeps a history of the commands used in your user’s session. But, when you use a command twice (or more), it will be saved with two (or more) entries in the bash history. The best way…
The !$ trick works on bash, csh, tcsh and zsh, but does not work on ksh. The !$ trick is very usefull in the Linux and Unix shells. In the Bash shell, the !$ inserts (and expands) the last used…
In this article I will show my favourite bash tricks. Because I am very lazy, I adore all the dirty tricks that can make my bash usage easier. 1-2 : The PATH and the CDPATH. The PATH and CDPATH are…
In this article I will show you two bash inputrc tricks. The first one is: set show-all-if-ambiguous on. Add this to your ~/.inputrc file because it is very usefull. When pressing TAB for command completion, all the matches will be…
The bash reverse-i-search is very usefull when needing to lookup for a command in the history. Press Ctrl – R and you get this: (reverse-i-search)`’: Type parts of the command you need to find and bash will give you the…
In this article I will show you how to cd into a directory by only typing the directory name. To do this, you have to activate the autocd. For bash: shopt -s autocd $ ls -ld naboo drwxrwxr-x 2 razvan…
In the previous wildcard post, I taught you how to use the asterisk * and the question mark ? wildcards. This article is about other, not so popular wildcards: the square brackets [ ] and the curly brackets {}. Note:…
The Ctrl – C / Ctrl – V copy / paste classic commands do not work in the Gnome-Terminal. In the Gnome-Terminal, Ctrl – C terminates the process, while Ctrl – V is interpreted different by the shell. I recommand…
The PATH is an environment variable that tells the shell where to look for the basic executables (commands) you use (such as ping, useradd, etc). Setting a new PATH depends on the shell, not on the Linux or Unix distro.…