Linux Commands - Part 1

This is a linux command line reference for common operations (part 1).
Examples marked with • are valid/safe to paste without modification into a terminal, so
you may want to keep a terminal window open while reading this so you can cut & paste.
All these commands have been tested both on Fedora and Ubuntu.

Linux Commands - part 1   Command Description • apropos whatis Show commands pertinent to string. See also threadsafe • man -t man | ps2pdf - > man.pdf make a pdf of a manual page   which command Show full path name of command   time command See how long a command takes • time cat See how long a command takes • nice info Run a low priority command (The "info" reader in this case) • renice 19 -p $$ Make shell (script) low priority. Use for non interactive tasks   dir navigation   • cd - Go to previous directory • cd Go to $HOME directory   (cd dir && command) Go to dir, execute command and return to current dir • pushd . Put current dir on stack so you can popd back to it   file searching   • alias l='ls -l --color=auto' quick dir listing • ls -lrt List files by date. See also newest and find_mm_yyyy • ls /usr/bin | pr -T9 -W$COLUMNS Print in 9 columns to width of terminal   find -name '*.[ch]' | xargs grep -E 'expr' Search 'expr' in this dir and below. See also findrepo   find -type f -print0 | xargs -r0 grep -F 'example' Search all regular files for 'example' in this dir and below   find -maxdepth 1 -type f | xargs grep -F 'example' Search all regular files for 'example' in this dir   find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; done Process each item with multiple commands (in while loop) • find -type f ! -perm -444 Find files not readable by all (useful for web site) • find -type d ! -perm -111 Find dirs not accessible by all (useful for web site) • locate -r 'file[^/]*\.txt' Search cached index for names. This re is like glob *file*.txt • look reference Quickly search (sorted) dictionary for prefix • grep --color reference /usr/share/dict/words Highlight occurances of regular expression in dictionary


Sursa
2009-02-21 15:59:28



Comenteaza





Ultimele 25 posturi adăugate

15:01:07Fără Titlu —» Путепроводные Заметки
13:50:14Fără Titlu —» Путепроводные Заметки
15:45:09Fără Titlu —» Путепроводные Заметки
05:18:00DIN COSMOGRAME —» Leo Butnaru
18:46:28Fără Titlu —» Путепроводные Заметки
17:48:06Fără Titlu —» Путепроводные Заметки
17:27:43Festivalul Internațional de Comedie FESTIS —» Biblioteca de Arte 'Tudor Arghezi'
13:37:15Fără Titlu —» Путепроводные Заметки
06:57:00ȘTIAȚI CĂ DEJA INTERNETUL ARE UN... SFÂNT PROTECTOR?... —» Leo Butnaru
04:15:41Fără Titlu —» Путепроводные Заметки
19:10:00Éxito —» Andrei LANGA. Blogul personal
19:10:00Éxito —» Andrei LANGA. Blogul personal
19:10:00Éxito —» Andrei LANGA. Blogul personal
15:04:54Fără Titlu —» Путепроводные Заметки
13:41:56Fără Titlu —» Путепроводные Заметки
06:15:00DISCUL SAU PĂTRATUL, MALEVICI SAU JAPONEZII? —» Leo Butnaru
02:31:21Fără Titlu —» Путепроводные Заметки
21:27:50Fără Titlu —» Путепроводные Заметки
20:56:34Fără Titlu —» Путепроводные Заметки
10:38:46A învins primarul în instanță —» Curaj.TV | Media alternativă
08:37:00DIN BIBLIOGRAFIA JURNALULUI —» Leo Butnaru
13:37:00Mortua est —» Andrei LANGA. Blogul personal
13:37:00Mortua est —» Andrei LANGA. Blogul personal
13:37:00Mortua est —» Andrei LANGA. Blogul personal
13:37:00Mortua est —» Andrei LANGA. Blogul personal