mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 12:57:01 +00:00
add system
find out the type of command and listing and printing function
This commit is contained in:
parent
fd28cae58b
commit
845891c75d
19
README.md
19
README.md
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user