How to Create 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).
Few quick steps:
- Boot up Linux.
- Go to a terminal screen. You can usually right click on the desktop and choose this option from the drop-down menu. 3A. Type dd if=/dev/cdrom of=~/cdrom_image.iso . OR. 3B. Type mkisofs -o /tmp/cd.iso /tmp/directory/ To make an ISO from files on your hard drive.
Steps
- Understand the format. In Linux, archiving multiple files is accomplished using the tar command.
- Create a tarball from a single directory.
- Create a tarball that includes multiple directories.
- Add files or directories to an existing tarball.
- Compress an existing .tar file.
- Compress the tarball when you create it.
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?
Type in the MKDIR command to create a directory or folder. In this case, we want to make a folder named TECHRECIPE, so we type in mkdir TECHRECIPE into CMD. 6.You are done. You can go to the newly created folder using CMD by typing in the command CD followed by name of the folder.