Options for Commands Flashcards
How do you list all available pages in the man documentation for a particular command (what option can you use)
man -f {command name (install, ls etc)}
This will give us any command that has to do with list
man -k list
Create a parent directory along with a current directory
mkdir
-p option will create parent directories as needed
How to remove files while also skipping prompt
f option removes the prompt when deleting files or directories
Option to update a group ID
groupadd -g 1214
How do you create a new user without a default home directory but instead assign it to a new group you create?
useradd -M -g ops barry (-M will not create a home directory for the user) (-g will create a group)
Update a user ID
usermod -u 1244 rachel
Change group name
groupmod -n dev1 dev. dev has been changed to dev1
Chane home directory for a user
usermod -d /home/flash barry
What command outputs the first/last part of files and specifies the number of lines to output?
head -n or tail -n (tail -f is used to append data as it grows)
What command prints lines matching a pattern and ignores case
grep -i
What command sorts lines of text or numbers and what option can be used to sort numerically?
sort -n
what command terminates a process and what is the default signal it sends?
Kill
-sends SIGTERM signal 15
-9 SIGKILL terminates processes without allowing cleanup similar to killing computer without allowing it to gracefully shut down