CLI more - 1
$ clear
$ who am i
$ whoamicount files
$ ls -l | wc -l
$ ls -l *.md | wc -l
$ ls -F | grep -V / | wc -lshutdown / reboot
$ sudo reboot
$ sudo shutdown -h nowsize
// size of target_dir
$ du -sh target_dir
// size of disk
$ df -hmove or copy
$mv old_dir_path new_dir_path
$cp -r source_dir target_dirscp
// 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/dirnamefind
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```
Last updated
Was this helpful?