Really OT: Any tar experts here?

From: morrison_at_t-iii.com <(morrison_at_t-iii.com)>
Date: Mon Sep 13 19:59:04 1999

My bet would be ls. With Kornshell:

tar cvf /dev/rmt0 $(ls -1F dir1 dir2 dir3 dir4 ... | grep -v "/")

Try:-

tar cvf junkfile $(ls -1F dir1 dir2 dir3 dir4 ... | grep -v "/")

as a test. Otherwise you need to run a shell script with test to sort out
dirs from files.

Neil Morrison

> -----Original Message-----
> From: Roger Merchberger [SMTP:zmerch_at_30below.com]
> Sent: Monday, September 13, 1999 5:12 PM
> To: Discussion re-collecting of classic computers
> Subject: Really OT: Any tar experts here?
>
> Sorry for the off-topic post, but I'm tired of beating what's left of my
> brains on what's left of my desk... Please, Please, Please, private email
> replies only.
>
> Non-essential info: I'm writing a selective backup program in Perl to read
> a config file, use the info to create a list of directories to be backed
> up, then give that listing to tar to back up the information.
>
> Essential info: Problem is, I have directories that I want backed up, but
> with subdirectories that I *don't* want backed up; yet when I feed the
> list
> of dir's to tar, it recursively backs up the dir's anyway.
>
> Is there a way (program switch, special version of tar, anything...) to
> tell tar to not recurse subdirectories, or do I need to write a
> sub-program
> that extracts each individual filename?
>
> Thanks in advance for any help that can be provided.
>
> Roger "Merch" Merchberger
> --
> Roger "Merch" Merchberger --- sysadmin, Iceberg Computers
> Recycling is good, right??? Ok, so I'll recycle an old .sig.
>
> If at first you don't succeed, nuclear warhead
> disarmament should *not* be your first career choice.
Received on Mon Sep 13 1999 - 19:59:04 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:32:36 BST