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

11:13:44Moldova (+ Georgia) și jocurile marilor puteri —» Curaj.TV | Media alternativă
13:07:33Fără Titlu —» Путепроводные Заметки
06:31:00PĂZITOR ȘI SCRIITOR —» Leo Butnaru
20:45:20Fără Titlu —» Путепроводные Заметки
19:26:07Fără Titlu —» Путепроводные Заметки
18:04:08Fără Titlu —» Путепроводные Заметки
16:30:53Fără Titlu —» Путепроводные Заметки
14:02:19Fără Titlu —» Путепроводные Заметки
06:18:00DIN YES-EURI —» Leo Butnaru
00:39:44Fără Titlu —» Путепроводные Заметки
23:18:25Fără Titlu —» Путепроводные Заметки
22:53:06O plimbare prin Capitala Neamului —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
18:29:28Fără Titlu —» Путепроводные Заметки
16:44:39Fără Titlu —» Путепроводные Заметки
06:51:05DIN STRICTL NECESAR —» Leo Butnaru
02:12:33Fără Titlu —» Путепроводные Заметки
23:17:51Fără Titlu —» Путепроводные Заметки
19:46:26Peter Heather, John Rapley – Why Empires Fall —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
19:33:08Fără Titlu —» Путепроводные Заметки
17:57:48Fără Titlu —» Путепроводные Заметки
14:36:11Fără Titlu —» Путепроводные Заметки
11:19:00„Anul lui Eminescu – Opere jubiliare ale geniului poeziei române” —» Biblioteca Publică or.Rîşcani
06:39:00DIN REVISTA TINERILOR —» Leo Butnaru
04:33:30Fără Titlu —» Путепроводные Заметки
02:11:28Fără Titlu —» Путепроводные Заметки