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

04:02:39Semnificatia fiecarei zile din Saptamana Patimilor —» Portalul Tineretului Ortodox din Moldova
23:31:48Și nimica mișcă —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
04:08:00LACONIC —» Leo Butnaru
18:05:00Elevii din Baimaclia au transformat eficiența energetică într-o mișcare comunitară 🌞 —» Sandu GRECU
05:38:00PRINTRE ROMÂNII DIN SERBIA —» Leo Butnaru
12:58:01Peste 14,6 milioane MDL pentru promovarea exporturilor: 16 asociații selectate în cadrul „BRIDGE Export” —» Sandu GRECU
12:52:00Republica Moldova un hub emergent pentru dezvoltarea de jocuri video - Istoria Paparuda Studio 🦹‍♂️ —» Sandu GRECU
04:38:00DESPRE JURNAL —» Leo Butnaru
16:09:10Atenţie la angajare peste hotare —» Curaj.TV | Media alternativă
13:33:00Renato Usatîi. Karaoke cu Plahotniuc, plăcinte de la Filat, primii bani la Moscova și dictatura 💥🔥💲 —» Sandu GRECU
07:09:00Cum monitorizarea inteligentă a energiei transformă viața comunității din Micleușeni 🌞 —» Sandu GRECU
03:34:01RACURSIU —» Leo Butnaru
16:52:00MNLR (CHIȘINĂU), EXPOZIȚIE TEMATICĂ —» Leo Butnaru
13:02:39Prima femeie zboară spre Lună —» Curaj.TV | Media alternativă
06:10:00POEZIA FRANCEZĂ —» Leo Butnaru
13:52:24Inovație prin creativitate la bibliotecă. Cercetare biblioteconomică —» Biblioteca de Arte 'Tudor Arghezi'
19:10:00Cum au devenit gospodăriile din Fălești protagoniste ale tranziției verzi ☘️ —» Sandu GRECU
15:52:00din yes-euri —» Leo Butnaru
14:18:00Urgent! Modalitatea de finanțare a sportului trebuie revizuită! —» Sandu GRECU
13:53:47Cel de-al cinci-lea congres al compozitorilor din Moldova —» CHIŞINĂU MUZICAL | Blogul Bibliotecii de Arte "Tudor Arghezi"
12:47:00CNED LANSEAZĂ APEL DE IDENTIFICARE A NOILOR ASOCIAȚII DE PROPRIETARI DIN CONDOMINIU ELIGIBILE PENTRU FINANȚAREA MĂSURILOR DE EFICIENȚĂ ENERGETICĂ 🌞 —» Sandu GRECU
10:43:15Industria calului, pe creștere —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
09:37:00LA PRAGUL EDITURII NEUMA —» Leo Butnaru
20:55:00Stingem lumina? #oraPlanetei —» Curaj.TV | Media alternativă
08:18:44Agresorul se eschivează, victima e calomniată #Cahul —» Curaj.TV | Media alternativă