Command Line Flashcards
(47 cards)
. command
current directory
.. command
previous directory
What is “" used for?
To escape a character
ls command
list the current filesystem
mv command
move a file
cp command
copy a file
what’s the difference between starting a filesystem with or without a “/”?
a starting / means it is an absolute path; not starting with one means a relative path
rm command
remove something
*
wildcard operator that matches any number of characters
-r
recursive option
find command
search for things
man command
brings up the manual
su command
substitute user: su <username> <password></password></username>
normal user privileges
can modify own stuff. can’t modify system stuff
root user privileges
You can modify anything. It is usually disabled
sudo command
briefly take command as a root user
why do file permissions have 9 slots?
3 groups of 3 permissions each. The groups are the current user, the group, and others. the type of permissions are read, write, and execute.
file permissions execute?
you can run the file as program
chmod command
changes the permission mode string
chown command
change the files owner
chgrp command
change the file’s group
how does octal file permission work?
each permission has a number: read: 4, write: 2, execute: 1. You add them all together ie if you have all permissions for user, you get 7. if you only have 5, you get read and execute. you will get a three digit number because you do permissions for user, group, and others all at once.
How does symbolic file permission work?
user, group, and others are represented by u, g, and o. Read, write and execute are represented by r, w, and x. To add a permission, you get the person (u g o) and use the plus symbol. You can subtract a permission with minus. You can set a permission with equals. You can also change all permissions at once with a instead of u, g, or o.