Common Commands

See list of actions on server: netstat -punta |grep nginx |wc -l


How do I login as root user?

Open terminal and simply type the following command:
$ sudo bash

OR
$ sudo -s

ls, ls -1 list dir
cd, cd-, cd ~ change dir
pwd
su -i

 

xmp

You can copy the content of a folder /source to another existing folder /dest with the command

cp -a /source/. /dest/
The -a option is an improved recursive option, that preserve all file attributes, and also preserve symlinks.

The . at end of the source path is a specific cp syntax that allow to copy all files and folders, included hidden ones.

grep -Ril “text-to-find-here” /
i stands for ignore case (optional in your case).
R stands for recursive.
l stands for “show the file name, not the result itself”.
/ stands for starting at the root of your machine.

 

 

Find file anywhere in system:

find / -name my.cnf

 

See your disc sizes report:

df -h


tail -f /var/log/syslog | grep mysql

tail -f frappe.log

Posted in Basic.