1
vote
0answers
8 views

Splitting tar archives and uploading them one at a time

I want to backup my systems to split tar archives with a script uploading them one by one. It has to create the split archive and then run a script. The script uploads the part and deletes it. This is ...
2
votes
0answers
134 views

tar: Cannot create symlink : File exists

I backup lots of gigebytes files in to myproject.tar.gz, and compress success without errors. Now, I want to decompress all to an folder "myprojects". adan@adan-Latitude-D630:~$ tar zxf ...
0
votes
0answers
34 views

redirect tar notices when used with pipe

I have a remote backup cron script that contains the following line: cat ${list} | xargs tar Jlcf - | ssh -i /root/.ssh/backup \ seron@dummy.net "backup_${DATE}.txz" It gives tar a list of ...
0
votes
2answers
410 views

Bash tar and output to log file

How can i write TAR operation in to a log file? tar -czvf arh.tar.gz public_html > 1.log TAR -czvf worked thanks guys! Now in bash script: for i in */ ; do ...
4
votes
2answers
245 views

How make a compressed tar when there are too many filenames for the shell to expand on a single line?

Normally I would just do something like: tar -czf archive.tar.gz *.csv But when there are too many files in the directory for the shell to expand on a single line this doesn't work. In these cases ...
1
vote
2answers
191 views

Advanced backuping script

I'm currently writing an advanced starting script for my minecraft server. Everything works out as I want it too. But the problem is the backups. I created a function for it. It works also great and ...
1
vote
6answers
520 views

How do I tar dot files but not dot directories

The following tar command will exclude all dot files and dot directories. tar -cvzf /media/bjackfly/bkup/bkup.gz --exclude '.*' --one-file-system /home/bjackfly In my case I want the dot files to ...
-1
votes
1answer
149 views

When I extract a tar file, all the files/folders have 777 permissions

I run Debian. I have a tar archive that, when extracted, assigns 777 permissions to all files/folders in it. I believe this has to do with the fact that I'm root, but is there a way to make it so they ...
0
votes
3answers
844 views

Prepend prefix in tar

I currently do in a shellscript very inefficiently: cp -a $MYPATH /tmp/$VERSION cd /tmp tar cjf archive.tar.bz2 $VERSION I want everything to be contained in the directory called $VERSION - is ...
1
vote
6answers
5k views

how to copy entire linux root filesystem to new hard drive on with ssh and tar

I know I've found this information before, but can't remember the right google query. I need to transfer an entire linux root filesystem off of a failing hard drive onto another computer with an ...
0
votes
2answers
387 views

What is the difference in various commands for compressing files in linux?

What are the commands for compressing files in linux and what are the difference between them? (for example: tar, gzip, rar). I'm working on Linux Mint 11 and doing a script for compressing files. I ...
1
vote
2answers
296 views

What's the difference between /proc and /proc/ (with a trailing slash)?

I try using tar to backup my files. With --exclude=/proc/, the archive contains files under /proc, and --exclude=/proc does not. What causes the difference? P.S. The shell I use is Bash.
0
votes
1answer
169 views

How do bash scripts expand file globs?

In this code, the excludespec variable is expected to match all it substring, but it appears to evaluate the to the actual files matching it when it is executed, rather than pass its exact ...
1
vote
1answer
75 views

in place refreshing of a large tar.gz?

I have a directory with about 300Mb of code and data, and I need to regularly change a few lines of code in a few of the files and repackage the directory into a new project-version.tar.gz. It takes ...
0
votes
1answer
268 views

Find a list of files from text file in subdirectories and put into tarball?

I have a list of files I need to tar. Typically, I would use tar -cvf allfiles.tar -T mylist.txt But I discovered that the files I need are scattered into subdirectories and my list only has the ...
1
vote
1answer
330 views

How to use Pipe Viewer (pv) for measuring compression progress?

I've been trying to track the progress of the data in a pipe, specifically in a large init script for a minecraft server. How would I go about using pv to get an accurate readout of progress? I've ...
7
votes
2answers
14k views

Linux Bash Script, Single Command But Multiple Lines?

I have the following script I wrote by searching Google, and it backs up my Linux system to an archive: #!/bin/bash # init DATE=$(date +20%y%m%d) tar -cvpzf ...
3
votes
1answer
2k views

Why is my tar.gz file corrupt after using bash ftp to move file to a remote server?

I back the tar.gz file up on the local server, then ftp it to a remote server. If I pull it to my desktop via ftp client from the local server, the file works fine. If I pull it to my desktop via ftp ...
1
vote
2answers
458 views

Bash: Concatenating TAR balls

Is it valid to do this: { tar -c dir1 tar -c dir2 } | cat > file.tar Is the resulting file.tar a valid tar ball? If not, how can I concatenate tar balls on the fly?
16
votes
4answers
2k views

Undo tar file extraction mess

I just untar'd an archive that produced a mess of files into my tidy directory. For example: user@comp:~/tidy$ tar xvf myarchive.tar file1 file2 dir1/ dir1/file1 dir1/subdir1/ dir1/subdir1/file1 ...
1
vote
1answer
63 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 ...
2
votes
1answer
3k 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
1k 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 ...
1
vote
1answer
771 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
286 views

is it plausible that Ubuntu's wildcard * with tar is somehow failing to restore 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
1answer
394 views

Problem restoring from tar backup: why are there /dev/disk/by-id/ symlinks and how can I avoid them?

I'm trying to make a bare-bone backup system with the most basic tools available on openSUSE 11.3 (in this case: bash, fdisk, tar & grub legacy) Here's the workflow for my scripts: backup.sh: ...
0
votes
7answers
4k views

“tar -xzf” for many “tar.gz” files in a directory

I have many files in a directory. every one of them have very different name: one.tar.gz juk.tar.gz cv.tar.gz erf.tar.gz vcx.tar.gz cxcd.tar.gz vc.tar.gz jkjk.tar.gz zxc.tar.gz asd.tar.gz ghj.tar.gz ...
19
votes
7answers
35k views

tar: Exiting with failure status due to previous errors

I have written a little script that tars and compresses a list of directories + files. The script appears to run succesfully, in that a useable .tar.gz file is created after the script runs. ...
1
vote
1answer
3k views

tar: extract myfile.tar.gz archive to a directory named myfile

Can it be done with tar? Do I have to write a bash script?
11
votes
5answers
2k views

Map “untar” to tar xvfz?

How can I map 'untar' as a command to 'tar -xvfz' ? Sorry, but I almost always forget the arguments necessary to 'tar' for this operation.