The tar tag has no wiki summary.
0
votes
1answer
24 views
How to ignore some folders when creating a TAR file in Linux?
I have a folder with 85 subfolders. I want to make a customized .tar file, meaning that I want to ignore some folders.
How can I do that?
2
votes
2answers
48 views
Modern command line file compression utilities
I am frequently moving large files around from server to server.
UNIXes comes with standard gzip and bzip2 compressors. However, what open options there exist beyond these, especially ones utilizing ...
1
vote
3answers
21 views
Extract file and folders with specified permissions
I pack a folder with lot of sub-folders and files in Windows with 7zip, upload to VPS and then run the command:
tar -xvzf file.tar.gz
then all unpacked files and folders have permissions of 777. ...
0
votes
2answers
32 views
Use tar and gz to create archive in Ubuntu Terminal
I want to archive 3 folders, given their names in Ubuntu command prompt.
When I use tar -c abc tt zz -> it will do nothing.
0
votes
0answers
31 views
tar - Ignore error when link is broken
I backups with tar. How to ignore error when link is broken? I want to follow links if (and only if) they are not broken. --ignore-failed-read doesn't work, tar exits...
0
votes
0answers
35 views
Can I stop a netcat tar pipe and continue later without overriding existing files?
I'm trying to copy a lot of files from my NAS to my server, about 2TB.
I found that using a netcat tar pipe to copy the directories go's pretty fast about 40mb/s.
It seems to work faster than rsync ...
1
vote
2answers
31 views
tar -x -v -f on tape drive in Ubuntu (latest)
I am given the following command:
tar -x -v -f /dev/rct0 -b 20 *
Could someone please explain its meaning, because in this form it looks completely useless to me. As far as I know -x stands for ...
0
votes
1answer
41 views
How to merge file when unarchive the tarball?
I downloaded a tarball(abc.tar.gz) which has a root folder(abc) and multiple subfolders(a, b, c, etc). And I have a folder called Target in machine(macbook pro), with multiple subfolders(a, b, c, etc) ...
0
votes
1answer
65 views
How to compress all directories that weren't used in the last month?
How can I compress all the directories that do not contain at least one file used in the last month?
1
vote
1answer
51 views
make: my own simple repository
I have got an account on a server at my university. I want to share a program code with another student. I thought I should put it on my github account. Unfortunately, I cannot because the code is ...
1
vote
1answer
28 views
tar compare or diff command line
What is wrong with this?
tar --diff --gunzip --file=/media/disk/filename.tgz
This is GNU tar 1.23 on Ubuntu. The complaint is gzip:stdin:input/output error.
The following just hangs and there is ...
0
votes
3answers
61 views
What does `tar -C` mean?
In the section "Installing Portage", the Gentoo installation docs say:
# tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
What does this command do?
0
votes
1answer
175 views
tar shows “is not a bzip2 file” error when uncompressing a .tar.bz file
I've a data_or.tar.bz file
I tried to extract it with
$ tar xjvf data_or.tar.bz
Output is
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting ...
2
votes
3answers
134 views
How do I convert tar.bz2 to tar.gz?
I'm new in Linux, is this conversion possible?
Do I need to compress and decompress all content?
0
votes
0answers
68 views
Use pv to monitor tar over ssh?
I prefer to use tar over ssh as opposed to scp for several reasons, e.g.
tar -czf - file1 file2 ... | ssh host "cd ~/destination && tar -xzf -"
However, I sometimes miss the scp progress ...
1
vote
1answer
31 views
Ignoring path while archiving with TAR
I have a file that contain list of files I want to archive with tar.
Let's call it mylist.txt
It contains:
/path1/path2/file1.txt
/path1/path2/file3.txt
...
/path1/path2/file10.txt
What I want to ...
1
vote
2answers
141 views
Untar a given linux tarball on MAC OS X
I have a Linux tarball that can't be unpacked. It gives me an unexpected error. I am told this is due to case insensitive on MAC OS X. How can I untar this file?
tar -zxvf file.tar.gz
...
x ...
1
vote
1answer
45 views
How to UnTar Wordpress contents to my document root without “wordpress” folder?
The contents of a Wordpress Tarball are all contained within a single directory called "wordpress". I would like to upload the archive to my server (CentOS) and UnTar all the files directly to the ...
0
votes
1answer
99 views
How do I unzip a tar gz archive to a specific destination?
I want to unpack a .tar.gz file to a specific directory.
The archive file is in /root/Documents. I want to unzip it into /root/Desktop/folder. The folder structure in zipped file should be preserved ...
0
votes
2answers
125 views
tar: “Cannot stat” when given arguments as shell variables
I have some directories in a location, that location's absolute path is stored in PROJECT_HOME. Now, I am trying to do the following in a script:
TARGET_LIST="bin lib scripts deployment"
tar -czf ...
0
votes
1answer
66 views
How to tar/untar the output on the fly
What is the idiomatic way to do the following
tar to stdout
read this tar output from stdout and extract to some other folder.
My solution is
tar --to-stdout .. | tar -C somefolder -xvf -
But ...
2
votes
1answer
69 views
How can I extract only some specific folders from a tar.gz archive?
Let's say I have the archive website.tar.gz, inside is the following folder structure :
home
-mike
-www
-coolwebsite
file1
file2
file3
etc.
When I ...
4
votes
3answers
264 views
TAR vs CPIO, what is the difference?
I am curious and did a bit of reading but still have questions.
What makes CPIO different than TAR? I was told in another question that tar is for pulling together many files into 1 archive which ...
1
vote
1answer
128 views
Mounting Fedora ISO DVD and then copy the full DVD structure locally
I need to recreate in a local folder called /distro/fedora/ the full directory tree (including eventually hidden files, symlinks, etc.) contained in the .iso file just downloaded ...
3
votes
2answers
112 views
is it plausible that Ubuntu's wildcard * with tar is somehow failing to find some files?
In this command line sequence I use a *.sh wildcard to restore some files. I got three hits. Knowing that there must be more, I typed in the whole name. For example: goFindRanges.sh. I was able to ...
0
votes
2answers
102 views
How to tar files with no extensions?
I have some directories with a varying numbers of files and subdirectories. All files that have no extensions have to be tared. Their names may change, thus they can not be hardcoded. Subdirectories ...
0
votes
2answers
108 views
extract a few members from tar archive and pipe through network
edit: I want to extra member01 and member02 and directory blah/
tarball_1.tar.gz contains directory test/ with 20 files. I want to extract only member test/member01 and test/member02 and directory ...
1
vote
4answers
65 views
linux tar command option
I know how to tar a bunch of files, minus several I don't want:
tar --exclude=./*.jpg -pcjvf all.tar.gz ./
Here I tar all files, except any jpg extensions.
I want to do the opposite. I need to ...
0
votes
2answers
147 views
How can I compress a large file into smaller parts?
I'm looking for a way to compress a large file (~10GB) into several files that wont exceed 150MB each.
Any thoughts?
1
vote
2answers
25 views
Excluding Path While Compressing with TAR/GZ
I am compressing list of files like this:
tar cvzf mycompress.tar.gz /dir1/dir2/file1.txt /dir1/dir2/file2.txt
However when I uncompressed them the directory /dir1/dir2/ is still preserved.
How to ...
0
votes
1answer
328 views
Howto pipe: cp | tar | gzip without creating intermediary files?
Can anyone tell me if it's possible to pipe | this without having to create a physical file anywhere between A and B.tar.gz?
This is what I'm trying to do:
File A
Rename A to B
Tar B.tar
gzip -9 ...
2
votes
2answers
277 views
Linux / MacOS tar incompatibility - tarballs created on MacOS give errors when untarred in Linux
When I tar up files on my Macbook and untar them in Linux, I repeatedly get the following warnings/errors:
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended ...
0
votes
1answer
46 views
Merge tar files in Windows Server
In my server(windows server) I have 3 tar files. (file.tar, file.tar-2, file.tar-3). I want to merge those files. (Those are generated by some server tool).
So I am looking for a tool to merge ...
0
votes
2answers
65 views
Git: Is it OK to copy (not clone) a git repository
I'm pretty new to Git and was wondering if it's ok to copy a git repository with common UNIX commands (like cp or tar/untar), rather than through git clone.
I'm in the situation where I have a ...
1
vote
2answers
106 views
GREP and TAR all files/directories matching X
I would like to find and gzip/tarball contents of all the folders matching
wordpress in my directory, but I am having trouble trying to get the command
to work, I thought it was something like
find ...
4
votes
1answer
59 views
Tar - split files
i am using the following command to backup and sql file:
tar -zcvf "$BACKUP_DST/$FILE_NAME.tgz" "$BACKUP_DST/$FILE_NAME.sql"
i want to make sure the compressed file wont be larger then 300mb, if it ...
2
votes
1answer
48 views
Which is better: using flags, or pipes?
As with many things in the *nix world, there is more than one way to generate .tar.gz files.
Typically, I use the following:
tar zcf /path/to/dir.tar.gz /path/to/dir
However, I have seen the ...
0
votes
1answer
57 views
Why is that when I attempt to verify an archive using tar I am displayed the error this does not look like a tar archive?
I am new to the world of linux and when attempting to verify a tar archive I am displayed the following error. When running the command tar cvfW archivename.tar filename directoryname does not yield ...
3
votes
3answers
802 views
How to specify level of compression when using tar -zcvf?
I gzip directories very often at work. What I normally do is
tar -zcvf file.tar.gz /path/to/directory
Is there a way to specify the compression level here? I want to use the best compression ...
0
votes
1answer
95 views
How to omit the “.” directory when creating a tar from directory?
To create a backup of entire directory I do:
tar -cPzf /home/misha/path/to/tar/tar_name.tar.gz
-C /home/misha/path/to/directory/to/backup .
In the resulting tar_name.tar.gz beside the files ...
0
votes
1answer
99 views
tar - exclude certain files
I wish to tar all files in a directory and its subdirectories that do NOT end in .jpg, .bmp, .gif, or png.
So, given the following folders and files:
foo/file.txt
foo/file.gif
foo/bar/file
...
0
votes
1answer
430 views
Convert .tar.gz/.tar.bz2 to .7z in batch?
How do I convert .tar.gz and .tar.bz2 files to .7z files using the command line?
3
votes
1answer
101 views
How to use tar to compress only two files in a directory?
I'm trying to compress only two files in a directory. Let's say I have a directory named 'images'. In the directory, I have a.jpg, b.jpg, c.jpg, and d.jpg. I like to compress only a.jpg and b.jpg ...
0
votes
2answers
181 views
Linux: Compressing all .pdf files recursively (.tar)
At the linux command line, I'd like to compress all .pdf files in a directory, any of it's subdirectories and so on - but only .pdf files. I'm struggling to figure out the syntax, any ideas ...
2
votes
2answers
385 views
What is the fastest compression method for a large number of files?
I need to compress a directory with around 350,000 fairly small files that amount to about 100GB total. I am using OSX and am currently using the standard "Compress" tool that converts this directory ...
0
votes
1answer
38 views
How to create a folder inside a tarball?
I created a tarball with multiple files. The rpm generator requires those files to be inside a folder. I don't want to move the files before generating the tar. Is there a way to create this folder ...
5
votes
5answers
212 views
How to do the equivalent of “grep something * -Rin” on list of tar.gz files?
I've got a bunch of tar.gz files and I want to do a "grep something * -Rin" as I would on them if they weren't tar.gzed. I want to keep them tar.gzed as they are, but grep on them on-the-fly and find ...
2
votes
3answers
61 views
tar-ing / should I use -C / . or just /
tar cvf backup.tar -C / / # or
tar cvf backup.tar /
produces an archive like
etc/
and gives warnings
tar: Removing leading `/' from member names
tar: Removing leading `/' from hard link ...
3
votes
1answer
64 views
gunzip -c equivalent for tar.gz files?
What is the equivalent of gunzip -c to pipe the content of a bunch of tar.gz files without having to permanently "tar xzf" them and "tar czf" them back?
Something like:
tar xzf "-c" *.tar.gz | xargs ...
2
votes
2answers
78 views
Control gzip compression rates while archiving files with tar?
I have a script which periodically backs up a directory using the command "tar -czvf [name] [directory]" but my problem is that the script has recently been putting a lot of stress on the server ...