Download the content of an URL to a filecurl http://example.com/text.txt -o filename.txt
Download the content of a URL and safe it by the given namecurl -O http://example.com/text.txt
Download the content of an URL to a filecurl http://example.com/text.txt -o filename.txt
Download the content of a URL and safe it by the given namecurl -O http://example.com/text.txt
Create a tar archive
tar -cf archive.tar file1 file2 ... fileN
Create tar archive from a directory
tar -cf archive.tar /path/to/directory/
Create a tar gzipp’d archive
tar -zcf archive.tar.gz file1 file2 ... fileN
Create a tar gzipp’d archive from a directory
tar -zcf archive.tar /path/to/directory/
Create multi-part tar archives from a directory
tar cf - /path/to/directory|split -b<max_size_of_part>M - archive.tar
Extract all files from a tar archive
tar -xf archive.tar
Extract all files from a tar gzipped archive
tar -zxf archive.tar.gz
Extract all files from a tar gzipped archive into a directory
tar -xzf archiv.tar.gz -C /path/to/directory/
Extract a single file from a tar archive
tar -xf archive.tar the_one_file
How much disk space takes a file or directory up?du -s -h /your/file
du -s -h /your/directory/
Get the 10 biggest files/folders for the current direcotrydu -sh * | sort -rh | head
Show free disk spacedf -h
List only directoriesls -d */
currently mounted filesystems in nice layoutmount | column -t
Mount folder/filesystem through SSHsshfs name@server:/path/to/folder /path/to/mount/point
Mount iso imagemount /path/to/file.iso /mnt/cdrom -o loop
Show a text file and replace text, here: replace foo with barsed s/foo/bar/g file.txt
Use ” if your search patterns contains spacessed 's/foo foo/bar bar/g' file.txt
Change a text file in place and replace text, here: replace foo with barsed s/foo/bar/g file.txt -i
Redirect output to Disksed s/foo/bar/g file.txt > newfile.txt
delete 5th linesed 5d file.text
Delete lines matching ‘foo’sed /foo/d file.txt
Print line 8sed -n '8p' file.txt
Print lines 8-10sed -n '8,10p' file.txt
Append new line containing ‘bar’, after lines containing ‘foo’sed '/foo/a bar' file.txt
Insert “hello” to the end of line 9sed 'i9 hello' file.txt
Examples:sed 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config