The GNU/Linux command line

From String Theory Wiki
Jump to navigation Jump to search

basics

ls -lrt

lists the contents of a directory with full details (l) in reverse (r) time order (t)

archiving

tar -xvzf some_archive_to_be_extracted.tar.gz 

this extracts (x) some_archive_to_be_extracted.tar.gz which is zipped (z); the command will talk to you (v) and won't bother you with further options (f)

tar -cpvzf some_archive_to_be_created.tar.gz /path/to/archive

will create (c) an archive file some_archive_to_be_created.tar.gz from the contents of /path/to/archive; it will zip it (z), preserve permissions (p), the command will talk to you (v) and won't bother you with further options (f)

printing

[1] is a useful resource for printing in Unix

lpr -Pprinter_name file.ps

prints file.ps

psnup -2 single.ps double.ps 

takes single.ps and makes double.ps with two pages of single.ps on each page of double.ps

psselect -p3-10 file.ps selection.ps

selects pages 3 to 10 out of file.ps and creates double.ps with this 8 pages