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

06:05:00POEME —» Leo Butnaru
13:33:00Arcadie Zaporojanu face azi 60 de ani! —» Sandu GRECU
13:08:00Life happens. —» Ghiocika
11:30:09Muzicologul Efim Tcaci —» Biblioteca de Arte 'Tudor Arghezi'
10:49:00A fi istoric! —» Biblioteca de Arte 'Tudor Arghezi'
10:28:04Dieta digitală —» Jurnal A.
06:38:00DESPRE LUCRURI VESELE —» Leo Butnaru
20:46:00Energie economisită, facturi reduse: măsuri de eficiență energetică adoptate de locuitorii Chișinăului pe timp de iarnă ☃️❄️ —» Sandu GRECU
16:30:00Impactul facturilor la energie asupra chișinăuienilor: Metode de economisire și rolul educației tinerilor —» Sandu GRECU
14:12:00Sport, comunitate, performanță. Kaufland devine Partener Principal Echipa Țării și Partener Oficial FMF ⚽️ —» Sandu GRECU
12:38:00Cât costă turismul olimpic. Ministrul care va face pușcărie. Incendiar. Gheorghiu 🔥🔥🔥 —» Sandu GRECU
04:40:00RACURSIU —» Leo Butnaru
14:47:32Canto academic la Chișinău —» CHIŞINĂU MUZICAL | Blogul Bibliotecii de Arte "Tudor Arghezi"
11:18:00FLORILEGIU DIN FLORILE DALBE —» Leo Butnaru
07:41:00Circomvoluțuni —» Andrei LANGA. Blogul personal
07:41:00Circomvoluțuni —» Andrei LANGA. Blogul personal
07:33:55Invazia rusească în Ucraina trece în anul V —» Curaj.TV | Media alternativă
18:41:38ARGHEZI: „Vecia închisă” a lui Eminescu —» Biblioteca de Arte 'Tudor Arghezi'
14:56:00Eden —» Andrei LANGA. Blogul personal
13:03:00Cum implementează Loteria Națională a Moldovei programul „Joc Responsabil” ☝️ —» Sandu GRECU
16:04:08UPD: Chișinăul și Kievul încearcă să detensioneze conflictul comercial —» Fine Wine
14:25:38Despre rezonanța muzicală a versului —» CHIŞINĂU MUZICAL | Blogul Bibliotecii de Arte "Tudor Arghezi"
14:25:38Despre rezonanța muzicală a versului —» CHIŞINĂU MUZICAL | Blogul Bibliotecii de Arte "Tudor Arghezi"
11:34:12Crama Mircești lansează vinurile din roada 2025 —» Fine Wine
09:28:00DIN STRICTUL NECESAR —» Leo Butnaru