2505 Test 1 Review Flashcards
difference between ls and ls -l
ls -l lists more info, size in byte, modification date, file owner, group
navigate to home directory
cd ~
navigate to previous directory
cd -
navigate to root directory
cd /
pwd command
prints full system path of current working directory
command to list all files in current dir
ls
what happens when you use “cd” without a destination
goes back to the home directory
command to copy a file to specific destination
cp [original] [new] [../]
command to make a directory
mkdir [name]
command to move a file
mv [file] [dir]
command to remove
rm
command to remove A DIRECTORY
rmdir
command to rename a file
mv [oldName] [newName]
reference for current directory
.
reference for parent directory
..
command to display contents of a file
cat [file]
command to show first few lines of a file
head [file]
command to report number of lines, words, and bytes
wc [file]
command to display lines of a file that match a pattern
grep
redirection operator to send output to a file and replace its contents
>
redirection operator to append info to contents of the file
> >
redirection operator to send contents of file to a program
”
file [name]
give info about file
3 types of users
owner (user), group, other (world)
command to change permissions
chmod
command to take away read and write permissions from group from file “foo”
chmod g-rw [path to foo]
how would chmod 740 change permissions for each group
owner: r w x
group: r - -
other: - - -
numeric args for chmod
no access - 0
execute - 1
write - 2
read - 4
command to create a collection of files
tar cvf [newTar] [targetFile]
command to check contents of tar file
tar tvf [tarFile]
flat tar files have no…
path listed/directory structure
what happens if you tar a dir?
the tar file will contain path info
command to extract a tar file
tar xvf [tarName] (-C [destination])
commands to unzip zip, gzip, and bzip2 files
unzip, gunzip, bunzip2