From 845891c75df1042e62fa61e829f82f8d868772e8 Mon Sep 17 00:00:00 2001 From: I-Man Ng Date: Fri, 10 May 2019 15:21:20 +0800 Subject: [PATCH] add system find out the type of command and listing and printing function --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38b4546..6c316b0 100644 --- a/README.md +++ b/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