How to Make a Directory in Linux?
Contents Create and Extract A. Tar. Gz Archive Using Command Line to Create a Tar. Gz Archive from a Given Folder You Can Use the Following Command. Tar -Zcvf...
Contents
Create and extract a .tar.gz archive using command line
- To create a tar.gz archive from a given folder you can use the following command. tar -zcvf tar-archive-name.tar.gz source-folder-name.
- To extract a tar.gz compressed archive you can use the following command. tar -zxvf tar-archive-name.tar.gz.
- To Preserve permissions.
- Switch the ‘c’ flag to an ‘x’ to extract (uncompress).
Create and extract a .tar.gz archive using command line
- To create a tar.gz archive from a given folder you can use the following command. tar -zcvf tar-archive-name.tar.gz source-folder-name.
- To extract a tar.gz compressed archive you can use the following command. tar -zxvf tar-archive-name.tar.gz.
- To Preserve permissions.
- Switch the ‘c’ flag to an ‘x’ to extract (uncompress).
Steps
- Gather your ISO files in the home directory. Place any files that you want to turn into an ISO file in a folder inside of the home folder.
- Open Terminal. Open the Menu, then click Terminal to open it.
- Enter the “change directory” command.
- Type in the ISO creation command.
- Press ↵ Enter .
Tar Notes
- Usage / Syntax. command [-options] /location/of/new/file.tar /files/to/archive.
- Example.
- Popular options and their significance.
- To extract files from your file.
- To select files for the tar file using find.
- To move tar file from one location to another.
How do I create a directory in Unix?
Directories
- mkdir dirname — make a new directory.
- cd dirname — change directory. You basically ‘go’ to another directory, and you will see the files in that directory when you do ‘ls’.
- pwd — tells you where you currently are.
Must Read
How do you create a directory?
To create a directory in MS-DOS or the Windows command line, use the md or mkdir MS-DOS command. For example, below we are creating a new directory called “hope” in the current directory. You can also create multiple new directories in the current directory by using the md command.