tar and bz2 a set of folders as individual files

for f in *screenflow ; do tar cvf "$f.tar.bz2" "$f"; done
I use screenflow to create and edit videos. The default storage for a single video is a folder. If I want to move that someplace, it's easier to zip up the folder and send it. If I'm making a series of short videos, I might have 10 folders. This will go through and make a single bz3 file for EACH folder.

0
2020-08-02 21:10:27

1 Alternatives + Submit Alt

What Others Think

This may break if "*screenflow" returns files/folders with weird characters, and it wont' actually compress the tarballs (it'll create them verbosely, but won't compress them).
minnmass · 292 weeks and 2 days ago
Are thoses comments all from Bots or what? This is pretty much a very very (very) basic find command. So much so that i am genuinely curious about comments saying how this is (almost) revolutionary. I maybe was under the impression that "FU" meant some sort of NINJA stuff or, at the very least, not a place where to post manpages examples. Maybe i am wrong. Surely.
oldfart · 290 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: