DEV Community

Vikas Singh
Vikas Singh

Posted on

All Linux commands for GCP

change directory: cd directory name
List file and folder: ls
Just Read a file: less filename
Edit a file: nano filename
Save File after edit: ctrl O + enter + ctrl X

Create a new file: cat<<'EOF'>Filename
filecontent
EOF

Jump to a new line:Ctrl + _ or Ctrl + shift + -
Remove file: rm filename
Rename file: mv file file1

Clear previous build: rm -rf .next out build dist
create build: npm run build
Restart server: pm2 restart appname(selgko)

Create tar backup: tar -cvf filename.tar
Then click on download file in ssh to download file.

Top comments (0)