add system

find out the type of command and listing and printing function
This commit is contained in:
I-Man Ng 2019-05-10 15:21:20 +08:00 committed by GitHub
parent fd28cae58b
commit 845891c75d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1483,10 +1483,25 @@ netstat -tulpn
readlink filename
```
##### Check where a command link to (e.g. python)
##### Find out the type of command and where it link to (e.g. python)
```bash
type python
# python is /usr/bin/python
# There are 5 different types, check using the 'type -f' flag
# 1. alias (shell alias)
# 2. function (shell function, type will also print the function body)
# 3. builtin (shell builtin)
# 4. file (disk file)
# 5. keyword (shell reserved word)
# You can also use `which`
which python
# /usr/bin/python
```
##### List all functions names
```bash
declare -F
```
##### List total size of a directory