An archive is a group of files or folders which have been crunched or compressed and bundled together into a single file in such a way that the individual files may be recovered intact. They are used to manage files and folders that contain information you want to keep but that you rarely access and aren’t currently using. They are compressed to save disk space and transfer time over Internet.
They are very popular for file sharing. They allow you to take a large file, break/split it into smaller parts, which can be downloaded individually and then, reassembled later when needed.
Once you have downloaded and installed 7-Zip, you can create a new archive by selecting some file(s) and folder(s) in Windows File Explorer or on your desktop, right-clicking the selected file(s)/folder(s), then choosing Show more options (Shift+F10), 7-Zip, Add to archive from the context menu.Give your archive a name (Archive), select a format (Archive format: 7z offers more ratio compression than other formats like zip or rar, zip is the standard compression file format for Windows and Mac files), where you want to save it (…) and compression level (0 -Store, no compression at all; 5 -Normal, 9-Ultra, maximum compression).
Besides, you can create encrypted archives. To encrypt your archive, make sure that AES-256 is selected (Encryption method) and provide a password under the Encryption section (Enter/Reenter password).
Bear in mind, that you will be able to drag and drop files and folders into this archive without any problems. To extract an archive, right-click on it and select Show more options, 7-zip, Extract files or Extract Here.
Once you have download and installed PeaZip, you can create a new archive by selecting file(s) and folder(s) in Windows File Explorer or on your desktop, right-clicking the selected file(s)/folder(s), then choosing Show more options (Shift+F10), PeaZip, Add to archive from the context menu.Give your archive a name (Output), select a format (7Z, ARC, PEA, RAR4, RAR5, ZIP), action (create new or update existing archive), where you want to save it (…) and compression level (Store, Fast, Normal, Ultra).
Bear in mind, that you will be able to drag and drop files and folders into this archive without any problems. To extract an archive, right-click on it and select Show more options, PeaZip, Extract Here.
Right click on the file(s) or folder(s) you want to archive, select Compress … from the context menu. It uses the Archive Utility (/System/Library/CoreServices/Applications). To extract an archive, right click on it and select Open With, Archive Utility.
Besides, you can use the Archive utility to compress files and folders (File, Create Archive…), expand an existing archive (File, Expand Archive) or change your preferences, e.g., archive format (compressed archive .cpgz, zip archive or regular archive .cpio -it does not perform any compression-) or to indicate where to save your archives. By default, the Archive utility will create the archive file in the same folder where the selected files and folders are located, but you can select the Into option to choose a different destination folder for all your archives.
#!/bin/bash # Script to extract files, view images, read plain text files, play music, etc. #!/bin/bash if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;;
To create an archive using tar, type: tar cvzf archive_name.tar.gz dirname/ where c creates a new archive, v is for verbose, f indicates that following is the archive file name. Gzip compression is added with the z option. To extract a file, type: tar xzf archive_name.tar.gz where x is for extracting files from an archive.
*.tar.gz) tar xzf $1 ;; *.tar.xz) tar zxvf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) rar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.xz) xz -d $1 ;;
To zip one or more files/directories, type: zip archive_name.zip filename1 filename2 ... or zip -r archive_name.zip directory1 directory2 file1 file2... To extract a zip archive, type: unzip archive_name,that’s it!😉 Installation: sudo apt install unzip (Ubuntu), sudo pacman -S unzip (Arch).
*.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.pdf) evince $1 ;; # sudo pacman -S feh evince *.mov|*.avi|*.mpeg|*.mpg|*.flv|*.wmv|*.mp4|*.mp3) vlc $1 ;; *.doc|*.docx|*.xls|*.xlsx|*.ppt|*.pptx|*.odf) libreoffice $1 ;; *.txt|*.conf|*.sh|*.py|*.hs) atom --no-sandbox $1;; *.png | *.jpeg | *.jpg) feh $1;; *) xdg-open $1 ;; esac else echo "'$1' is not recognized as a compressed file" fi