# data[].attributes.body
tar

- to extract

tar -zxvf example.tar.gz

- to create an archive of directory

tar -zcvf example.tar.gz example

zip

unzip

# data[].attributes.body
whois

- tell me more about a domain, e.g.

whois github.com

ping

- Check if a website is responding and find out it's IP address, e.g.

ping github.com
NB: Use Ctrl + C to end this process
wget

- download web resources, e.g. download WordPress PHP files

wget http://en-gb.wordpress.org/wordpress-4.0-en_GB.tar.gz

# data[].attributes.headline
Accessing and copying files to remote servers

# data[].attributes.subject
Accessing and copying files to remote servers

# data[].attributes.body
ssh

rsync

scp

# data[].attributes.body
which
- for example where is the version of php I am using installed
which php

NB: To find out what version of a tool you are using often -v will tell you, e.g.

php -v

node -v

# data[].attributes.body
ln -s

# data[].attributes.body
du -sh *

- Checking the size of sub directories

df -h

- How much space is there left on the disk

# data[].attributes.body
locate

find

- e.g. where in this directory is test.txt

find . -name test.txt

# data[].attributes.body
chmod

Often you need to change file permissions, e.g. make read/writeable files to the web server

chmod -R g+rw uploads
- recursively allow the group to read and write to files in the uploads directory

# data[].attributes.body
less
- read files a page at a time
head

- read the first n lines of a file, handy for checking very large files, e.g.

head -n 5 war-and-peace.txt

tail

- read the end of a file. Handy for reading log files as they are being written to, e.g.

tail -f error_log

# data[].attributes.body
WARNING there's no undo

rm
- removes a file, e.g.
rm test.txt

rm -Rf

- recursively deletes files and directories, with no confirmation

rmdir

- remove directory, NB: This will only delete empty folders

# data[].attributes.body
touch

This can be used to create an empty file or update the modified date on an existing file, e.g.

touch test.txt

# data[].attributes.body
cd
- e.g change to your example directory
cd example

Return to your home directory

cd ~

Return to the previous directory

cd -

Move up a directory

cd ..

# data[].attributes.body
mkdir
Create a new directory called example
mkdir example

Automatically create any missing sub folders

mkdir -p how/deep/can/you/nest/folders/very

# data[].attributes.body
man

- This will show you a page of the manual for a particular command e.g.

man ls

- NB: press q to exit

# data[].attributes.body
ls
Show hidden files that start with a dot e.g. .htaccess - a local Apache configuration file

ls -a
Show more information, like permissions and file size
ls -l
Show human readable files
ls -hl