added find
This commit is contained in:
parent
46bf073fbb
commit
c1e96ad15b
@ -58,13 +58,24 @@
|
|||||||
"whoami" and "groups":
|
"whoami" and "groups":
|
||||||
they respectively output the current user and groups
|
they respectively output the current user and groups
|
||||||
NOTE: one alternative to "whoami" is "echo $USER" which can be used in scripts
|
NOTE: one alternative to "whoami" is "echo $USER" which can be used in scripts
|
||||||
|
FIND:
|
||||||
|
Sources:
|
||||||
|
https://www.cyberciti.biz/faq/how-do-i-find-all-the-files-owned-by-a-particular-user-or-group/
|
||||||
|
refer to man for all the available options
|
||||||
|
Basic syntax:
|
||||||
|
"find <dir> [OPTIONS]"
|
||||||
|
OPTIONS:
|
||||||
|
"-user <user>" find files owned by a particular user
|
||||||
|
"-group <group>" find files owned by a particular group
|
||||||
|
"-ls" list results in "ls" format:
|
||||||
|
"-name <filename>" find a specific file or pattern (*.txt)
|
||||||
|
|
||||||
-Adding users to groups:
|
-Groups:
|
||||||
"usermod -a -G grup user"
|
Adding users to groups:
|
||||||
reboot
|
"usermod -a -G grup user"
|
||||||
|
reboot
|
||||||
-Listing all groups:
|
Listing all groups:
|
||||||
"cut -d: -f1 /etc/group | sort"
|
"cut -d: -f1 /etc/group | sort"
|
||||||
|
|
||||||
-Linux afterinstall (how to get thing working):
|
-Linux afterinstall (how to get thing working):
|
||||||
Bluetooth usage:
|
Bluetooth usage:
|
||||||
|
Reference in New Issue
Block a user