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

23:12:04Ready to make anything |! Autodesk is a leader in 3D design, engineering and entertainment software. —» Informaţii pentru studenţi !
23:12:02The highest quality medical massagers and personal health —» Informaţii pentru studenţi !
21:45:13M-am născut și am crescut la țară. —» Curaj.TV | Media alternativă
20:44:58Cine a inventat epidemiile și vaccinurile #palavre —» Curaj.TV | Media alternativă
18:00:00Kotlin Intro —» Un nene Project
14:41:16MAE al României solicită Ucrainei clarificări după afirmațiile președintelui Zelenski referitoare la ocuparea de către români a nordului Bucovinei —» Elena Robu
14:14:31Despre Gala Cineaștilor și boala națiunii —» TheTEAtru | teatru, ceai & rock'n'roll
14:09:2750 de români au tranzitat zona ameninţată de Coronavirus. Care este starea lor —» Elena Robu
13:08:56PORTRET* —» Andrei LANGA. Blogul personal
12:26:43Emerald Green Chair Covers —» Andrei Fornea
11:14:42How To Get Smell Out Of Garbage Disposal —» Andrei Fornea
11:08:55Lucrează cu sticla la înălțime fără niciun fel de protecție —» Curaj.TV | Media alternativă
10:52:05Light Brown Booties —» Andrei Fornea
10:47:13Oscar Wilde. În curând —» Vitalie Coroban
10:40:57Sexul VS Barza – APROAPE TRAFICATĂ LA 16 ANI —» Curaj.TV | Media alternativă
10:32:51Чтобы помнили… —» Biblioteca Hristo Botev
10:12:03Am recuperat jurnalul cenzurat de Europa Liberă —» .:EU:.
08:16:53Salonul de lectură „Dialoguri…” —» BiblioCity
04:57:07“I'm afraid of flying”: 7 ideas on how to get distracted during a flight —» Informaţii pentru studenţi !
04:57:04Upgrade Your Home Theater Experience with Adorama’s Winter Tech Sale —» Informaţii pentru studenţi !
02:44:00“I'm afraid of flying”: 7 ideas on how to get distracted during a flight —» plop andrei
01:52:36Upgrade Your Home Theater Experience with Adorama’s Winter Tech Sale —» plop andrei
22:58:10Americanii fac drumuri, românii grădinițe, iar moldovanii votează cu rușii —» Badan Blog
21:43:26Schema prin care ruși și ucraineni devin cetățeni români fără să-i verifice nimeni —» Elena Robu
21:39:51Vaccinurile nu cauzează Autism —» A little web world