Common Linux command record
Published in
2 min readJun 6, 2017
Use them frequently but forget how to every time LOL.
Scp (copy files over network connection, usually copy local files to remote)
scp -P 20202 [the path of uploading file] [remote name]@[remote IP]: [destination path]
scp -P 20202 ./pics/myPic.jpg daniel@192.1.1.1:/myproject/pics
The whole directories?
scp -P 20202 -r ./pics daniel@192.1.1.1:/myproject/pics
chmod (change the permissions of files or directories)
Change image directories are writeable and readable.
chmod -R 777 /image
sudo (Execute command as root )
sudo su -
then type the password to execute command as root.
rm -rf (delete directories)
rm -rf [directories name]
mv (move files or directories from one location to another, or rename them)
mv daniel.php bluce.php
grep (find file content which match the key word)
grep -r [keyword] .