Check These Out
It is a pain grep-ing/sed-ing/awk-ing plain old df. POSIX it!
the google-api gives you only one translation which is sometimes insufficent. this function gives you all translations, so you can choose which one fits best.
Very helpful when you've got complex filenames and needs to change just some small parts of it.
Renaming a file called "i-made-a-small-typo-right-here" to "i-made-a-big-typo-right-here":
$ mv -vi i-made-a-{small,big}-typo-right-here
You could also copy multiple files, edit, remove, process, etc.
Ever use 'locate' to find a common phrase in a filename or directory name? Often you'll get a huge list of matches, many of which are redundant, and typically the results are not sorted. This command will 'locate' your search phrase, then show you a sorted list of just the relevant directories, with no duplications. So, for example, maybe you have installed several versions of the java jre and you want to track down every directory where files matching "java" might exist. Well, a 'locate java' is likely to return a huge list with many repeated directories since many files in one directory could contain the phrase "java". This command will whittle down the results to a minimal list of unique directory names where your search phrase finds a match.
If you enable multiuser, then you can permit others to share your screen session. The following conditions apply:
1. screen must be suid root;
2. "multiuser on" must be configured in ~/.screenrc;
3. control the others user(s) access with "aclchg":
# ----- from ~/.screenrc-users -----
aclchg someuser +rx "#?" #enable r/o access to "someuser"
aclchg someuser -x "#,at,aclchg,acladd,acldel,quit" # don't allow these
aclchg otheruser +rwx "#?" # enable r/w access to "otheruser"
aclchg otheruser -x "#,at,aclchg,acladd,acldel,quit" # don't allow them to use these commands
# -----
After doing this (once), you start your session with:
$ screen
Then, the other user can join your terminal session(s) with youruserid:
$ screen -r youruserid/
Note: the trailing "/" is required.
Multiple users can share the same screen simultaneously, each with independent access controlled precisely with "aclchg" in the ~/.screenrc file.
I use the following setup:
# ~/.screenrc-base
# default screenrc on any host
source $HOME/.screenrc-base
source $HOME/.screenrc-$HOST
source $HOME/.screenrc-users
# -----
Then, the base configurations are in ~/.screenrc-base; the host-specific configurations are in ~/.screenrc-$HOST, and the user configurations are in ~/.screenrc-users.
The host-specific .screenrc file might contain some host-specific screen commands; e.g.:
# ~/.screen-myhost
# -----
screen -t 'anywhere' /bin/tcsh
screen -t 'anywhere1' /bin/tcsh
# ----
The .screenrc-base contains:
# ~/.screenrc-base
## I find typing ^a (Control-a) awkward. So I set the escape key to CTRL-j instead of a.
escape ^Jj
termcapinfo xterm* ti@:te@:
autodetach on
zombie kr
verbose on
multiuser on
Export all Mailman mailing lists Members to separate .txt files excluding "Mailman" and "Test" or add yours by && $1!="myDontWannaList"
Use curl and sed to shorten an URL using goo.gl without any other api
Installs pip packages defining a proxy
Reads stdin, and outputs each line only once - without sorting ahead of time. This does use more memory than your system's sort utility.