How to create RAR files on Linux

Configurare noua (How To)

Situatie

Solutie

Creating a RAR file requires having one or more files or directories you want to archive. For testing purposes, we’re creating some text files and adding a line to them. If you already have the files you want to archive, then you don’t need to do this.

Create the files with this command:

touch test1.txt test2.txt test3.txt test4.txt test5.txt

Add text to them using the echo command:

echo “This is a text file” >> test1.txt

Now we will add these files to our RAR archive using:

rar a test.rar test1.txt test2.txt test3.txt test4.txt test5.txt

The “a” option is used for adding files or directories to the archive. Then you specify the name of the RAR file you want to create. Lastly, list all the files and directories you want to add to the archive. If you’d like to confirm if the RAR file was created, use the ls command to list the contents of the current directory.

Tip solutie

Permanent

Voteaza

(1 din 2 persoane apreciaza acest articol)

Despre Autor