Regular Command
Count folder's size
du -sch /path/to/folder/*typeSet Time & Date NTP
sudo timedatectl set-ntp yesScan WiFi
sudo iwlist wlan0 scanSet default shell
sudo ln -fs /bin/bash /bin/shAPT Search Package
sudo apt-cache search keywordAPT Error Fix
If it shows
E: Encountered a section with no Package: headerJust clean the error link
sudo rm /var/lib/apt/lists/* -vfAnd then
sudo apt-get updateStart SSH
sudo /etc/init.d/ssh startChange SSH Port
sudo vim /etc/ssh/sshd_configthen
sudo service ssh restartRegenerate SSH Key
ssh-keygen -R "you server hostname or ip"Check crontab status
sudo /etc/init.d/cron statusSet crontab
Edit cron
crontab -eRemove cron
crontab -rList cron
crontab -lStart cron
sudo service cron startStop cron
sudo service cron stopReload cron config
sudo service cron reloadRestart cron
sudo service cron restartCheck cron status
sudo service cron statusSet default path of terminal
echo 'cd ~/Desktop/' >> ~/.bashrcIf in MacOS, use
echo 'cd ~/Desktop/' >> ~/.bash_profileZip
zip
-h Show the help interface-m After the file is compressed, delete the original file-o Set the latest change time of all files in the archive to the time of compression-q Quiet mode, does not display the execution of instructions during compression-r Treats all subdirectories under the specified directory together with the file-P Set the compression password
Unzip
unzip
-l Show the files whitch contained in the compressed file-t Check if the compressed file is correct-P<password> Unzip files with password
Terminal
Ctrl + Alt + F2 = Terminal
Alt + F7 = Exit Terminal
Vim
Paste content: Shift + Ins Or Shift + right-mouse-click
Rclone
Show process every 1 second when upload files:
rclone copy -v --stats 1s [File] [Target]Remove rclone:
sudo rm /usr/bin/rclonesudo rm /usr/local/share/man/man1/rclone.1Rclone Config File
rclone -h | grep "Config file"Google API Google Console
Check Nginx config file syntax
nginx -t -c /etc/nginx/nginx.confScreen
Kill specific screen
screen -S [pid/name] -X quitOr
kill [pid]Kill all screen
killall screenLast updated