Archiving & Compression Flashcards
What is the linux command to hide a file?
mv file.ext .file.ext
What is the linux command to remove an item?
rm
What is the linux command to copy an item?
cp
What is the linux command to create and remove a folder?
mkdir
rmdir *folder must be empty
What is the linux command to update a folder/files timestamp?
touch file.ext
What is the linux command to create an empty file?
touch file.ext
What is the linux command to copy a folder?
cp -R
What is the linux command to remove a folder/item forces?
rm -rf
What can be substituted for quotes when referencing a name with spaces?
\
i.e
My\ Pictures
What is the linux command to zip a file?
zip -r filename.zip filetobezipped
must specify -r to recurse folder hierarchy/structure on folders, tar does automatically
What is the linux command to archive (concatenate) files/folders?
tar -c -f filename.tar files/folderstobearchived
- c create -f must be called last
- z gzip file -j bzip2 file
- x extract
What is the linux command to gzip a file/folder?
gzip filetobegzipped
*cannot archive multiple
gunzip filetobegunzipped
What is the linux command to bzip2 a file/folder?
bzip2 filetobebzipped
*cannot archive multiple
bunzip filetobebunzipped
What is an alternative file extension to .tar.gz?
.tgz
What is an alternative file extension to .tar.bz2?
.tbz