https://www.linkedin.com/learning/cert-prep-lpi-linux-essentials-010-160/
Character names:
Commands: ls, pwd, mv, rm, mkdir, touch, locale, hostname, date, uptime, df
wildcard: characters of regexp: ? * []
Hard Link vs Symbolic Link
https://linuxhint.com/linux_pipe_command/
https://ryanstutorials.net/linuxtutorial/piping.php
https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_07
Every single program in the UNIX/Linux system has 3 built-in data streams.
pipe redirection (|): send data from a program to another. file redirection (>): sends or gets data to/from a file
user@bash: wc -l < myoutput 8
user@bash: wc -l < barry.txt > myoutput user@bash: cat myoutput 7
user@bash: ls -l video.mpg blah.foo 2> errors.txt
ls asdf.txt > myoutput 2>&1
the 2>&1 output goes to myoutput
https://stackoverflow.com/a/40319372/1034806
-command > output
is just a shortcut for command 1> output
#! (is a script) /... (program executed) #!/bin/bash
#!/bin/bash # variables: # $ip=.... # conditional expressions # if [ -s filename ] filename=$1 if [ -f "$filename" ]; then echo "File exists" else echo "File does not exist" fi
execute it:
./asdfasdf.sh
https://www.tecmint.com/linux-process-management/
Programs
/etc/passwd
whoami
id
adduser
useradd
usermod and groupmod to manage users and groups
who: who is logged in the system
var/log/auth.log : all info about users
permissions for user, group and others
chown
chgrp
umask
sticky bit
suid
sgid