- Easily SSH using PUTTY by creating a shortcut passing in username and server
"C:\Program Files\PuTTY\putty.exe" -ssh user@<hostname>
- Copy files from Windows to Linux and Linux to Windows
pscp -scp "C:\local\path\to\file" user@<hostname>:/remote/path/to/file
pscp -scp user@<hostname>:/remote/path/to/file "C:\local\path\to\file"
- Moving around the command line
- Use the last argument from a previous command
<Esc> + .
- Repeat the last command
!!
- Delete the last word in current command
<Esc> + delete/backspace
- Use the last argument from a previous command
- Finding things
- Find a file under a specific path
find /path/ -type f -name 'file.ext'
- List subdirectories of a path
find /path/ -type d -print
- Find files and remove "permission denied" errors
find / -name <term> 2>&-
- redirects results that errored
- Find all of the distinct file extensions in a folder hierarchy
find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u
- Find a string in files
grep -rnw '/path/to/files/' -e 'string_to_match'
- Find a file under a specific path
- Getting server info
- Memory
free -m
top
- Disk space
df -h
- OS
cat /etc/os-release
- Memory