Let's say I want to create a password-protected RAR file named Hello.rar with few files then, I will be using the following: rar a -p Hello.rar read.sh length. Once you execute the rar command in the above manner, it will prompt you to enter the password (twice), If you want to create a RAR file enabled with password protection, you'd have to use the -p flag with the a as shown: rar a -p Filename.rar File1 File2 File3 To verify the process, you can list its contents: 3. Install from Software Center: Goto Ubuntu Software Center, search for rar package, and click on install (you may have to authenticate yourself by entering your ubuntu login password)Wait for some time till it gets installed. Want to update the existing RAR file by adding some files to it? It can easily be done using the u option as shown: rar u Filename.rar File1 File2įor example, here, I added non-empty.sh file to the Scripts.rar: rar u Scripts.rar non-empty.sh It can be installed by 3 methods: Commandline: Open the terminal and execute. There are times when you may want to remove some unnecessary files from a RAR file and in that case, you can use the d option: rar d Filename.rar File_to_remomveįor example, here, I removed cat.sh from the Scripts.rar file: rar d Scripts.rar cat.sh 2. Once done, you can create a RAR file by using the rar command in the following manner: rar Filename.rar File1 File2 File3 File4 FileNįor example, here, I created a RAR file named Scripts.sh containing multiple scripts: rar a Scripts cat.sh empty-string.sh length.sh lines.shĪnd unlike unrar command, the rar command allows you to modify existing RAR files in various ways. Similar to unrar, you need a different CLI utility that will allow you to create and modify RAR files.Īnd for that purpose, you'd have to install rar using the following: sudo apt install rar If you want to list the contents of a RAR file to verify file contents, it can be achieved using the l flag: unrar l Filename.rar How to create RAR files in Ubuntu To unrar files to a different directory, all you have to do is append the path where the files need to be extracted as shown: unrar x Filename.rar /path/to/extractįor example, here, I extracted to the subdirectory named New: unrar x Scripts.rar New/ 2. Unrar files to a different directoryīy default, the unrar command will extract files in the current working directory but that's not always user want. Once done, you can use the unrar command with the x option and it will extract files in the original directory structure: unrar x Filename.rarįor example, here, I extracted files from the Scripts.rar file: unrar x Scripts.rarīut you can do a lot more with the unrar command. To unrar files in Ubuntu, you'd have to install a CLI tool called unrar using the following command: sudo apt install unrar ![]() Well, in this tutorial, I will walk you through the following: ![]() So the question is how do you unrar a file in Ubuntu? ![]() While installing packages from the source, you may encounter files in the RAR format.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |