Tips & Tricks

Here's a list of command line tips that I've found useful over the years.

Linux Command Line

Web Development

Page status (http status code): curl -I

IP of remote site: dig +short

File Management

Here's one for placing a 'shortcut' from one file to another. Useful for keeping configuration files standard. I can put a config file in Dropbox/Nextcloud and refer to it on any machine I'm using.

Symbolic link: ln -s real_file shortcut_name

List files with details: ls -la

Find out where your disk space is going: du -a (directory) | sort -n -r | head -n 10

This estimates size, sorts the results, and returns the top 10

Make a directory on the server available as a directory locally. Need SSH set up (ideally with key file), and the local directory to exist. sshfs <user>@<server-ip-address>:<server-full-path-of-folder> <location-of-where-to-mount-locally>