Categories
Command Line

Plesk basic commands

Create customer

/usr/local/psa/bin/customer --create USERNAME -passwd PASSWORD -name USERNAME

Create user

plesk bin user --create EMAIL -owner USERNAME -passwd PASSWORD -cname USERNAME -role ROLE

The role could be owner or webmaster or …

Create subscription

plesk bin subscription --create example.com -owner USERNAME -service-plan "Default Domain" -ip xx.xx.xx.xx -login USERNAME -passwd "PASSWORD"
Categories
Linux

Find files Linux commands

Search zip files

find . -type f -name '*.zip' -exec du -ch {} + | sort -h -r | head -n 20

Search folders with large size

du -a * | sort -n -r | head -n 20
Categories
Command Line

Log terminal commands and output

Script Method

Start

script screen.log

End

exit

Alternate method

[COMMAND] > output.txt

Appending to previous data

[COMMAND] >> output.txt
Categories
Command Line

Diff terminal command basic

Usage

diff file1.doc file2.doc

List of lines added

diff --changed-group-format='%>' --unchanged-group-format='' file1.doc file2.doc
diff -u file1.rsc file2.rsc | grep -E "^\+"

List of lines removed

diff --changed-group-format='%<' --unchanged-group-format='' file1.doc file2.doc
diff -u file1.rsc file2.rsc | grep -E "^\-"
Categories
Linux

Get Recently installed softwares in Debian

Via command line

cat /var/log/dpkg.log.1 | grep "install"