config $HOME/.kshrc to edit psi variable/home PSI=hostname$ Export PSI
PERMISSION CATEGORIES
ls n show permission and guess info r= read w=write x=execute -=denied
CHANGE PERMISSIONS chmod command to change permissions/symbolic/octal mode. Symbolic_flode filename conbo letters /symbols to add permission Octal # to represent permissions Example: chmod o r filename remove read from user chmod u+x, go+r add x for owner/add r for group Octal mode chmod octal_mode filename change permission 4 read 2 write 1 execute example: chmod 44 dante
UMASK UTILITY umask rwx default =022 umask 000 rw-rw-rw- this is set umask 027 change umask value to #
ACL Owner grants /denys permission to specific user, group, other
getfacl [-a] filename display content -a display file name, owner group ACL entry u[ser]:perm the permission for user g[roup]:perm permission for group o[ther]:perm permission for other
ls l will show type of ACL means Trivial ACL + non trivial ACL getfacl display list of ACL entries
setfacl ACL_ENTRY filename -m creates/mods ACL ENTRY -s substitute new entry w/ old entry -d deletes ACL entry -r with m or s
Example: setfacl m u:acluser:7 file will add all permissions to file RECALCULATE ACL MASK
setfacl -d acll_entr filename example: setfacl d u:acluser2 file2 delete ACL from file 2
SWITCHING USERS su username to switch users without logging in/out whoami;pwd will show current user and directory
SEARCHING CONTENT IN FILES
grep search character egrep search character fgrep search string
grep options pattern filename search for -i search uppercase/lowcase -l list files with matching lines -n relative line # -v invers search /shows lines dont match -c counts lines that match -w full word/ignores parts of word ^ beginning with /patter $ ending with pattern . characters in between * star matches 1+ character sequence [ ] matches patter inside [^] matches pattern with no ^pattern
egrep options pattern filename + matches 1 or more of proceding characters [a-z] + ark x|y matches either OR .. apple|orange <|> groups characters move searches
find pathname expressions actions search in file/directory -name filename finds all metacharacters filename -size [+ | - ]n finds files longer or smaller n=size + longer - less then -mtime [+ | - ]n mod files more/less/exact(n) days -user loginID all files by loginID -type finds file type -perm by permissions
-exe command { } \;
Specific command {} delimits where file name is pass \; limits the end -ok command { } \; Requires permission before running -print Default find will show pathname -ls Will display info
SOLARIS PROCESS
dtlogin gives graphic promp to login ps option list associated w/yourself -e every process PID TTY CMD -f full verbose listing shows all -ef list all process currently schedule to run
ps with grep
ps -e|grep lp shows process with string lp
pgrep searches process by name pgrep options pattern -x displays PID with exact match -n most recent line with pattern -U vid specific pattern belonging to user (vid) -l name and ID -t term process associated with terminal
ptree list as sub process ptree 56525 example ------- ------ ----