regular expressions and tar

From: Taylor, David (DTaylor_at_WBMI.COM)
Date: 05/30/03

  • Next message: MARLON BORBA: "Re: Accessing Novell Shares from AIX"
    Date:         Fri, 30 May 2003 15:52:30 -0500
    To: aix-l@Princeton.EDU
    
    

    Hi *

    I am attempting to tar all the subdirectories that begin with the letters a-d. The command I used was:

    tar -cvf /dev/rmt0 [a-d]*

    Looking at the process list, it shows that the shell expanded the arguments correctly:

    wbmpxdb01 / # ps -fu XPbackup
         UID PID PPID C STIME TTY TIME CMD
    XPbackup 18312 64408 2 May 29 pts/2 33:45 tar -cvf /dev/rmt0 /XPmnt brwarne clparch data ddmarqu dmbichl dmwiesn
    XPbackup 64408 72142 0 May 28 pts/2 0:00 -ksh
    wbmpxdb01 / #

    However, as I watch the output to the screen, tar is going after every subdirectory.

    I have tested this using different ranges and it always grabs all of the subdirectories.

    Can anyone explain why it might be doing this?

    TIA

    David

    **********************************************************************
    This email and any files transmitted with it are confidential and
    intended solely for the use of the individual or entity to whom they
    are addressed. If you have received this email in error please notify
    the system manager.

    This footnote also confirms that this email message has been swept by
    MIMEsweeper for the presence of computer viruses.

    www.mimesweeper.com
    **********************************************************************


  • Next message: MARLON BORBA: "Re: Accessing Novell Shares from AIX"

    Relevant Pages

    • cant figure out an one-liner
      ... I have a directory structure like this ... I'm trying to move some subdirectories of /home to ... /newhome, using tar. ... I'd like to get it done with one command line. ...
      (freebsd-questions)
    • Re: tar only files modified since ...
      ... Ivan Marsh wrote: ... >>I would like to 'tar' only the files modified since a given date, ... >>directory and all of it's subdirectories. ... and 'created' and I found these two params: ...
      (alt.linux)
    • Re: regular expressions and tar
      ... It is interesting to note that you have a /XPmnt as the first file/directory ... name in the list of files/dirs to be backed up. ... I am attempting to tar all the subdirectories that begin with the letters ...
      (AIX-L)
    • QUESTION: Odd behavior with tar
      ... databases on SERVER1, and copy the tar files to SERVER2. ... The meat of the script is a tar command which is supposed to traverse ... and tar up files in all subdirectories ...
      (comp.unix.aix)
    • Re: Moving /var/mail
      ... If there are no other subdirectories in /home/kellyw then ... Unfortunately, if there are hard links in that directory, it will also ... You might want to consider using tar instead of cp if your file structure ... The tar method would probably be ...
      (freebsd-questions)