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

12:13:56Epicrama: a doua generație —» Fine Wine
08:00:02Feteasca Generation dă tonul la Soirée Blanche: cinci vinării cu noutăți în pahare —» Fine Wine
05:23:25PROZE —» Leo Butnaru
13:16:08Moldoveanul Artiom Livadari va lupta în GLORY 💥🏆 —» Sandu GRECU
15:55:57Un Yes-Eu —» Leo Butnaru
14:51:14Merdeneaua 2.0 —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
14:46:16Algoritm Literar. Nr. 9, iulie 2014 —» Algoritm Literar
14:46:16Revista Algoritm Literar. Nr. 10, decembrie 2014 —» Algoritm Literar
14:46:15Revista Algoritm literar, trim. I, 2015 —» Algoritm Literar
14:46:15ALGORITM LIERAR nr. 2/2015 —» Algoritm Literar
14:46:15ALGORITM LITERAR nr. 3 (13)/2015 —» Algoritm Literar
14:46:14Algoritm Literar, nr. 4 (14) 2015 —» Algoritm Literar
14:46:14Algoritm Literar, nr. 1 (15), anul VII, martie 2016 —» Algoritm Literar
14:46:13Algoritm Literar, nr. 2 (16), trimestrul II, 2016. —» Algoritm Literar
14:46:13ALGORITM LIETRAR nr 3/2016! —» Algoritm Literar
14:46:12ALGORITM LITERAR NR 1/2017 —» Algoritm Literar
04:40:04BACOVIA —» Leo Butnaru
12:55:11Fără Titlu —» Leo Butnaru
05:03:22ÎNTRE PROZĂ ȘI YES-EU —» Leo Butnaru
15:11:26„O societate puternică înseamnă o societate informată și unită” – Rodica Lilica, studentă la programul dual Finanțe și Bănci, ASEM 💫 —» Sandu GRECU
15:04:29„Europa nu este doar o destinație, ci cel mai sigur plan prin care ne putem moderniza fiecare localitate” – Cristian David, Președinte ILD România 💫 —» Sandu GRECU
12:10:57Feteasca Run: prima cursă care unește vinăriile din Cricova —» Fine Wine
11:53:47Festivalul vinului de autor: 4-6 septembrie —» Fine Wine
18:11:55FIECARE COPIL MERITĂ ȘANSA DE A-ȘI URMA VISUL! 💙💛 —» Sandu GRECU
05:11:19DIN REVISTA TINERILOR —» Leo Butnaru