Hot answers tagged

3

With zsh, using process substitution and its tee-like behaviour when you redirect a file descriptor several times: zcat file.tar.gz > >(cd /media/disk1 && tar xf -) > >(cd /media/disk2 && tar xf -) With other shells with support for process substitution (ksh, bash): { zcat file.tar.gz 4>&- | tee >({ cd /media/...


2

Examples for Most Common Compression Algorithms The question title for this is simply "Compress a folder with tar?" Since this title is very general, but the question and answer are much more specific, and due to the very large number of views this question has attracted, I felt it would be beneficial to add an up-to-date list of examples of both archiving/...


1

It may be due to him tar gzipping things like /proc/kcore (which is entire system memory) and other things in /proc and /dev. Which take no space in linux (as they are virtual FSes), and have 0 size when compressed, but when you untar them, they probably take one filesystem block each. I would suggest installing Windows linux subsystem. And using something ...


1

If you need to only exclude directories in the same directory as the .gitignore file, you can add two rules in .gitignore: # # exclude log directory in the same directory as .gitignore # # - for git /log/ # - and for the linux shell ./log This way, git uses the entry with the leading / and does not match ./. Shell-tools like tar on the other hand, can't ...


1

You could use awk together with numfmt: tar --list --verbose --file myfiles.tar.gz | \ awk '{ \ "numfmt --to=iec-i --format=%7.f --suffix=B " $3 | getline x; \ $3=x; \ print $0 \ }' This modifies the third column (i.e. the file size column), replacing the number of bytes with a human readable size obtained from numfmt. ...


Only top voted, non community-wiki answers of a minimum length are eligible