Complat software training 101
  • Introduction
  • Day 1
  • Day 2
  • TODO
  • Linear regression
  • Tmux
  • quick link
  • CLI more - 1
  • Vim more - 1
  • MQ
  • iv - 1
  • iv - 2
  • iv - 3
  • clear Arch
  • lv - array
  • INTERVIEW - JS
  • RDKit - read/write
  • RDKit - process
  • RDKit - transform
  • RDKit - rxn
  • SYSTEM DESIGN - Question
  • SYSTEM DESIGN - EX1
  • SYSTEM DESIGN - EX2
  • SYSTEM DESIGN - EX3
  • SYSTEM DESIGN - EX99
Powered by GitBook
On this page
  • Shebang
  • Variable

Was this helpful?

CLI more - 1

$ clear

$ who am i
$ whoami

count files

$ ls -l | wc -l
$ ls -l *.md | wc -l
$ ls -F | grep -V / | wc -l

shutdown / reboot

$ sudo reboot
$ sudo shutdown -h now

size

// size of target_dir
$ du -sh target_dir

// size of disk
$ df -h

move or copy

$mv old_dir_path new_dir_path

$cp -r source_dir target_dir

scp

// remote foo.txt to local
$ scp username@remote.edu:/home/username/foo.txt .

// local foo.txt to remote
$ scp foo.txt username@remote.edu:/home/username/dirname

find

find . -type f -name 'file_name'

Shebang

script.sh

#!/bin/bash
echo "Script is fun!!"
$ chmod 755 script.sh
$ ./script.sh &

#! interpreter

& return pid

#!/usr/bin/python
a = 1
b = 2
print('a + b = ', a + b)

Variable

VARIABLE_NAME="value"
SERVER_NAME=$(command)

echo "The output contains ${SERVER_NAME}"

variable name should be uppercase

old syntax: `SERVER_NAME=hostname```

Previousquick linkNextVim more - 1

Last updated 5 years ago

Was this helpful?