- SSH
- TUNNELS
- SSH-KEYGEN
- DU
- SCP
- UPDATE-ALTERNATIVES
- LS
- Clear RAM Memory Cache, Buffer and Swap Space
- CRONTAB
ssh [remote_user]@[remote_ip]
ssh -p [port_number] -L [local_server_port]:[local_server_ip]:[local_server_port] [remote_user]@[remote_ip]
with more connection
ssh -p [port_number] -L [local_server_port]:[local_server_ip]:[local_server_port] -L [local_server_port]:[local_server_ip]:[local_server_port] [remote_user]@[remote_ip]
Remove the RSA KEY. When display the message: "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!", execute the command
ssh-keygen -R [IP]
Show the file/folder size
du -s -h *
du -s -h /[folder]
du -s -h [file]
scp -P [ port ] [file_name] [user]@[ IP ]:[remote path]
To copy a directory add param -r:
scp -r -P [ port ] [file_name] [user]@[ IP ]:[remote path]
update-alternatives --install /usr/bin/[command_name] [command_name] [path]/bin/[some command] 100
update-alternatives --display [command_name]
update-alternatives --config [comand_name]
ls -la |grep [PARAM]\ [PARAM]
ex.: ls -la |grep Feb\ 21
https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/
- Clear PageCache only.
#echo 1 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a
- Clear dentries and inodes.
#echo 2 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a
- Clear PageCache, dentries and inodes.
#echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a
Edit crontab
crontab -e
* * * * * /path/file.sh
Descriptions of the crontab date/time fields
field meaning allowed values
__________________________________________________________
1 minute 0-59
2 hour 0-23
3 day of month 1-31
4 month 1-12 (or names, see below)
5 day of week 0-7 (0 or 7 is Sun, or use names)