|
cd Directoryname
|
Change Directory
|
|
ls
|
List Items in Current Directory
|
|
ls -lha
|
List Items with extra Info in Current Directory
|
|
mkdir Directoryname
|
Make Directory in Current Directory
|
|
mv Filename (new Location or Filename)
|
Move or Rename File or Folder
|
|
mv -R Filename (new Location or Filename)
|
Move or Rename File or Folder including subdirectorys
|
|
cp Filename (Copied Filename)
|
Copy an File
|
|
cp -R Directoryname (Copied Directoryname)
|
Copy an Directory
|
|
tar -czvf Backupname.tgz .
|
Backup complete Content from Current Directory
|
|
tar -czvf --exclude="ExcludeData" Backupname.tgz .
|
Backup Content from Current Directory with Excludes
|
|
tar -xzvf Backupname.tgz
|
Extract Backup in Current Directory
|
|
mysqldump -u User -pPassword DBName -h Host > Backupname.sql
|
Backup/Export Database to Current Directory
|
|
mysql -u User -pPassword DBName -h Host < Backupname.sql
|
Import Backup from Current Directory to Database
|
|
User1: screen -l
|
to start screen
|
|
User2: screen -ls
|
to check wich screens we have
|
|
User2: screen -x
|
to connect
|
|
vim Filename
|
create/edit File
|
|
vi Filename
|
create/edit File
|
|
In Editor Command Mode
|
|
|
:w
|
To Save the File
|
|
:q
|
To Close the Editor
|
|
:wq or :x
|
To Save and Close the Editor
|
|
? Word
|
To Search in the File
|
|
Press i
|
To switch to Insert Mode
|
|
In Editor Insert Mode
|
|
|
Press ESC
|
To exit the Insert Mode and go to Command Mode
|
|
grep -rnw -e "Searchword" *
|
Search in Current Directory
|
|
scp -C ssh-username@ssh-host:/path/to/file .
|
Download File over SSH from an Server
|
|
wget url
|
Download File over http/https
|
|
alias new-commandname="Command"
|
Create an Alias for the Current Session
|
|
clear
|
Clears the Terminal
|
|
history
|
Shows the History of Commands
|
|
ctrl + r
|
to search in the History
|
|
varnishhist
|
Show a histogram chart of the last 1,000 requests
|
|
varnishlog
|
See what Varnish is currently processing
|
|
varnishstat
|
Show various information about varnish
|
|
netstat -tulpn | grep LISTEN
|
Shows you all LISTEN Ports with the Service
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.