aral, (edited )
@aral@mastodon.ar.al avatar

This is a niche one but it might help someone in the future:

How to include multiple directories from different places in the file system hierarchy in an archive without including the whole directory structure for any of them.

https://codeberg.org/aral/gists/src/branch/main/how-to-include-multiple-directories-from-different-places-in-the-file-system-hierarchy-in-an-archive-without-including-the-whole-directory-structure-for-any-of-them.md

TL; DR: use symlinks.

4censord,
@4censord@unfug.social avatar

@aral can node tar not create an archive in multiple steps?
with normal tar, i'd just create an archive and add the first files, and then just append the other files to the archive with a tar command with different working directory

Direktory like:

.  
├── file1.txt  
├── file2.txt  
└── folder  
 └── file3.txt  

Commands:
tar cf archive.tar file{1,2}.txt
tar rf archive.tar -C folder file3.txt

Creates an archive like:
$ tar tf archive.tar
file1.txt
file2.txt
file3.txt

aral,
@aral@mastodon.ar.al avatar

@4censord It can but I’m not sure how I’d do that and keep a stream open to the browser (I’m streaming the archive to the HTTP response).

(I don’t want to create intermediary files.)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • modclub
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • Durango
  • slotface
  • rosin
  • thenastyranch
  • kavyap
  • GTA5RPClips
  • cubers
  • JUstTest
  • tester
  • osvaldo12
  • tacticalgear
  • ethstaker
  • ngwrru68w68
  • khanakhh
  • Leos
  • normalnudes
  • cisconetworking
  • provamag3
  • megavids
  • anitta
  • lostlight
  • All magazines