Tag Info

New answers tagged

1

There's a great tutorial on doing incremental backups called "Easy Automated Snapshot-Style Backups with Linux and Rsync". It's somewhat dated but sounds like it might be good reading for what you're trying to do. Here's a link: http://www.mikerubel.org/computers/rsync_snapshots/ Based on the above tutorial, a utility called rsnapshot has also been created: ...


1

You mention you don't like tar --list because it's slow. I'm guessing this is because it's a large tarball, and it has to re-scan the whole thing. If this is indeed the case, you can get better performance out of this by scanning as it's being created: tar -c /input/directory | tee output.tar | tar -t > filelist.txt This uses tee to split the resulting ...


1

You could append each file to the tar file: for f in file ...; do echo "$f" tar rf result.tar $f done


15

tar -c data_dir | wc -c without compression or tar -cz data_dir | wc -c with gzip compression or tar -cj data_dir | wc -c with bzip2 compression will print the size of the archive that would be created in bytes, without writing to disk. You can then compare that to the amount of free space on your target device. You can check the size of the data ...


1

-cvf does not include any compression, so doing that on a ~1 GB folder will result in a ~1 GB tar file (Flub's answer has more details about the additional size in the tar file, but note even if there are 10,000 files this is only 5 MB). Since you have 4+ GB free, no you will not fill the partition. an easily downloadable copy Most people would ...


2

tar itself can report on the size of its archives with the --test option: tar -cf - ./* | tar --totals -tvf - The above command writes nothing to disk and has the added benefit of listing the individual filesizes of each file contained in the tarball. Adding the various z/j/xz operands to either side of the |pipe will handle compression as you will. ...


5

The size of your tar file will be 937MB plus the size of the metadata needed for each file or directory (512 bytes per object), and padding added to align files to a 512-byte boundary. A very rough calculation tells us that another copy of your data will leave you with 3.4GB free. In 3.4GB we have room for about 7 million metadata records, assuming no ...


0

Just install an archive manager. sudo apt-get update sudo apt-get install file-roller


0

I suggest you the following bash script : #!/bin/bash FIRST=1 unset TARFILE unset FILESET find . -name '????_??_??_*.txt' | sort | while read fn do CURTARFILE=`echo $(basename $fn)|awk -F_ '{print $1"_"$2"_"$3".tar.gz"}'` if [ "$CURTARFILE" == "$TARFILE"] ; then FILESET=$FILESET" \"$fn\"" FIRST=0 continue fi [ ...


2

This is very simple: tar -cvzf 2014_04_01.tar.gz 2014_04_01_??.txt Update To do this for multiple dates (GNU find): find . -maxdepth 1 -name '????_??_??_??.txt' | cut -d_ -f 1-3 | sort -u | while read date; do tar -cvzf "$date".tar.gz "$date"_??.txt done


2

You need to -exec a shell command instead: find . -name "*.txt" -exec sh -c 'tar cfj $(basename "{}" .txt).tb2 "{}"' -- {} \; Moreover, note that your find command is finding the files at all levels. As such, using basename to pass the list of files wouldn't work if the files do not exist in the current directory. To elaborate, tar cfj foo.tb2 foo.txt ...


-2

on my Linux x86_64 x86_64 x86_64 GNU/Linux to perform that operation i use simply the following command: tar cvfpz /path/archive.tar -T list.txt This command cause a creation of a compressed archive under /path using a list of file included into list.txt file.


0

Look inside the tar file: tar ztvf OEM.tar.gz Maybe "they" have put the ISO and some READMEs in that archive. If so, extract the whole archive by typing: tar zxf OEM.tar.gz I think there will be some README file with instructions about how to burn or how to put it on a pendrive...



Top 50 recent answers are included