Using tar option to extract the contents of a rar file [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have uploaded a rar file under linux server .
When i used unrar -e filename.rar or rar -e filename.rar , i got this error Command not found rar.
As i am not a root user , i dont have permissions to install unrar Into linux machiene .
So please tell me is it possible to use tar option to extract the contents of a rar file ??
When i used unrar under Linux machiene i got this
-bash-3.00$ unrar
-bash: unrar: command not found
-bash-3.00$
Thank you

You must install the unrar or unrar-free packets from a repository.

Related

How to untar zip file in linux/ubuntu? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I downloaded file which it's info.tar.gz located into directory called root.
so in the terminal linux/ubuntu I did this
cd ./root and did ls so I see the file called
info.tar.gz
so after Im in root directory I did
tar -zxvf info.tar.gz
but the file is still in the root directory zipped / tarred ..any help?
I tried to do cd ./root/info.tar.gz but it tells me that info.tar.gz isn't a directory
Any help please to untar/unzip the file in linux/ubuntu?
You can just double click on the tar file and click 'extract' to unzip the file.
Another way to unzip the file via terminal :
Type the following command in the terminal after moved the directory where the zip file stored.
tar -xf info.tar.gz

Linux -How to delete all files in a directory without using find [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to delete all files in my directory "XYZ" without using find command in bash on Linux.
Use the following command:
rm -f XYZ/*
If you want to delete also subdirectories, use:
rm -fr XYZ/*
If you also want to delete the directory, use
rm -fr XYZ
If you want to delete all files in a directory, go into the directory and execute: rm -f *
Why would find even enter into it? use rm -r XYZ to recursively remove the directory XYZ.

Uncompress tar.gz file [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
With the usage of wget command line I got a tar.gz file. I downloaded it in the root#raspberrypi. Is there any way to uncompress it in the /usr/src folder?
Use -C option of tar:
tar zxvf <yourfile>.tar.gz -C /usr/src/
and then, the content of the tar should be in:
/usr/src/<yourfile>
Try this:
tar -zxvf file.tar.gz
gunzip <filename>
then
tar -xvf <tar-file-name>

How to make a tar backup of a root filesystem? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have linux installed on SD card, I used this command to install the rootfs
tar xpjf rootfs.tar.bz -C /mnt/rootfs/
Now, I made some changes to the rootfs and I would like to create a backup that I can use with the same command above, I tried using:
tar cpjf rootfs.tar.bz2 /mnt/rootfs
and
tar cpjf rootfs.tar.bz2 -C / mnt/rootfs
I also tried
tar cpjf rootfs.tar.bz2 /mnt/rootfs/*
And tried:
cd /mnt/rootfs
tar -cvpjf rootfs.tar.bz2 --exclude=/rootfs.tar.bz2 .
tar: ./rootfs.tar.bz2: file changed as we read it
but I end up with an archive that has two levels before the file system i.e mnt/rootfs/files What am I doing wrong ?
That's because it starts from current working directory, you can do:
cd /mnt/rootfs
tar cpjf /rootfs.tar.bz2 .
And that should create an archive at /rootfs.tar.bz2 with its root at the contents of /mnt/rootfs/

tar --files-from complains "Cannot stat: No such file or directory" [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
When I type " tar -cvf ~/changeset.tar --files-from ~/changeset.txt", It responds with this output: http://pastie.org/1071080. Here is the contents of ~/changeset.txt: http://pastie.org/1071084 . In other words, a bunch of relative paths. As a sanity check,
$ ls admin/memberinformation.php admin/memberinformation.php
Why can't tar find any of these files even though they are clearly reachable from the current directory with the relative paths given?
FYI: $ tar --version tar (GNU tar) 1.15.1
The clue is the position of the colon in the tar output.
You've got a bad case of the trailing spaces. Get rid of them in your changeset file.

Resources