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

09:13:00DIN POEZIA LUMII / FRANȚA —» Leo Butnaru
09:34:01DIN STRICTUL NECESAR —» Leo Butnaru
17:18:38Iarna e ca vara, pe ici pe colo —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
12:42:00CU TELEVIZIUNEA ÎN CASĂ, PREZENTĂM CELE 11 VOLUMEA ALE JURNALULUI UNEI EPOCI —» Leo Butnaru
10:37:24Leo Butnaru își prezintă jurnalul scris timp de peste 50 de ani: „Jurnal... —» Leo Butnaru
06:51:00DIN POEZIA LUMII —» Leo Butnaru
19:53:20Romanian Air Force salvează vieți —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
13:20:53Încă o operațiune specială —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
09:59:00POEZIA FRANCEZILOR —» Leo Butnaru
20:43:00Год Огненного Коня. —» Александр Ищенко - Размышления
15:28:00AVEȚI O CUTIE CU FOTOGRAFII? —» Leo Butnaru
13:33:53Bilanț, 2025 —» Biblioteca de Arte 'Tudor Arghezi'
06:37:02DE REVELION —» Leo Butnaru
07:06:00DIN REVISTA TINERILOR —» Leo Butnaru
06:14:00DIN POEZIA LUMII —» Leo Butnaru
10:34:00AVANPREMIERA UNUI INTER-VIU —» Leo Butnaru
10:22:00GÂNDURI LA FINAL DE AN 2025 —» Leo Butnaru
06:32:00DIN POEZIA LUMII —» Leo Butnaru
10:45:10Elfrida Koroliova: prin labirintul pasiunilor —» Biblioteca de Arte 'Tudor Arghezi'
06:53:00POEME DIN REVISTA TINERILOR —» Leo Butnaru
14:23:00Stix —» Andrei LANGA. Blogul personal
17:12:43Razie cu scandal filmată de Activistul buzoian —» Curaj.TV | Media alternativă
07:01:00JURNALUL CA MEMORIE —» Leo Butnaru
13:53:00Covor —» Andrei LANGA. Blogul personal
13:53:00Covor —» Andrei LANGA. Blogul personal