Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 391 Bytes

tar.md

File metadata and controls

9 lines (7 loc) · 391 Bytes

tar practical

Get list of names to archive from standard input

$  git ls-files             | tar -czvf /tmp/project.tar.gz -T - 
$  ls -dp .* | grep -v '/$' | tar -czvf /tmp/dot.tar.gz     -T - 

exclude pattern when directory (do not use trailing / in the pattern)

$  ls -dp .c* | grep '/$'   | tar --exclude '*cache*' --exclude '*con*' -czvf /tmp/dotc.tar.gz -T -