Shorter cut

With *nix, there's always a better way. As I was browsing the mailing lists, I came across an interesting thread about piping the output of find to tar through xargs.

*Slaps my forehead.* Now, why didn't I think of that? So, given my problem with compressing SARG outputs, here's a single-line command that effectively does what I wanted to do with that convoluted script:

# tar -czvf `date +%d%b%Y`.tar `date +%d%b%Y-%d%b%Y`/



This can be extended to run through several dates, probably in a for...in...`seq... code block.

Comments

Popular posts from this blog

Pull files off Android phone