Linux command line

1. alias

$ vi ~/.bashrc

#no space #esc and :wq (write and quite)
alias gcptest1="ssh -i ~/.ssh/gcp jk@35.196.84.132"

$ source ~/.bashrc

#to access GCP server via terminal
$ ssh -i ~/.ssh/gcp jk@35.196.84.132

# or use alias
$ gcptest1

2. CPU / memory status check

$ top

alt text

3. file type convert

# ipython nbconvert --to FORMAT notebook.ipynb
$ ipython nbconvert --to=python config_template.ipynb
$ ipython nbconvert --to=markdown config_template.ipynb

4. zip & unzip file or directory

#zip
$ sudo apt-get install zip
$ zip -r compressed_filename.zip foldername

#unzip
$ sudo apt-get install unzip
$ unzip file.zip -d destination_folder

5. total of disk space used

$ df -h --total

Reference

Set Up Command Aliases in Linux

Converting notebooks to other formats

command line - How to unzip a zip file

command line - How can I create a zip archive

How do I find the amount of free space on my hard drive?


© 2018. All rights reserved.

Powered by Hydejack v7.5.0