-
Notifications
You must be signed in to change notification settings - Fork 3
parts 3_aliases
xeor edited this page Apr 3, 2011
·
1 revision
Aliases is all about being productive and have speed. Here is a list of the most important ones which is loaded if you enable it in the config. Note that osx (dont know about bsd), have problems on some commands when they have multiple of the same options. Example if we use an alias for 'tail -n 30' and you write tail -n 1, the command 'tail -n 30 -n 1' will be issued. osx wont take this, but Linux will. Therefor, we should be carefull about overwriting commands with aliases.
- (Linux, osx) - more verbose chmod/chown
- (Linux) - tail/head defaults to the screen height if no -n is specified.
- More verbose and confirmation turned on before overwriting/deleting, on rm, cp, mv
- . is pwd, .. is cd .., ... is cd ../.. and so on (5 levels)
- psa is 'ps aux'
- cpr is 'cp -prv' (keep rights, recursive and verbose)
- mkdir is 'mkdir -p' to automatically create folders more than one level depth
- one letters aliases: j = 'jobs -l, c = 'clear', l = 'll' (ls -l), p = 'psa' (ps aux), n = 'nano'
- Turned on color and human size format on ls.
- ll gives a nice and easy to read ls -l output. On mac with attributes, on Linux group directories first
- More ls aliases
- la = ls -Al (show hidden files)
- lk = ls -lSr (sort by size, bigges first)
- lc = ls -ltcr (sort by and show change time, most recent last)
- lu = ls -ltur (sort by and show access time, most recent last)
- lt = ls -ltr (sort by date, most recent last)
- lm = ls -Al | less (Pipe trought less)
- lr = ls -lR (recursive)