Re: [SLUG] tarring dot files and directories only

2002-10-17 Thread Glen Turner
Denis Crowdy wrote:


I'm having a serious mental issue with trying to create a tar archive of
only my dot files (and dot directories).



Try something like:

cd /home/me
find . -type f -o -type d -a -name '.*' -print | \
  tar --create --file=fred.tar --files-from=-

Note that the order of -o (or) and -a (and) arguments
in the find command is significant -- put the -a
conditions last.

Cheers,
Glen

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] tarring dot files and directories only

2002-10-17 Thread Broun, Bevan
on Fri, Oct 18, 2002 at 12:40:04PM +1000, Colin Humphreys <[EMAIL PROTECTED]> wrote:
> > tar czvf filename.tar.gz .*  
> 
> tar czvf filename.tar.gz .??* 

that wont get a dot file with only 1 other letter .x

ls -A |grep "^\." is a good way to get all dirs and files that start with .
but not . and ..

so 

tar czvf filename.tar.gz `ls -A |grep "^\."`

BB


> -- 
> SLUG - Sydney Linux User's Group - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] tarring dot files and directories only

2002-10-17 Thread Colin Humphreys
> tar czvf filename.tar.gz .*  

tar czvf filename.tar.gz .??* 
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



[SLUG] tarring dot files and directories only

2002-10-17 Thread Denis Crowdy
Hi all,

I'm having a serious mental issue with trying to create a tar archive of
only my dot files (and dot directories).

tar czvf filename.tar.gz .*  

gets me everything which I guess it should but is not what I want;
should I pipe ls into tar somehow?  I've read a couple of FMs quickly to
no avail...

Thanks,

Denis Crowdy

-- 
Department of Contemporary Music Studies
Macquarie University
NSW 2109 Australia, ph: +61 (0)2 9850 6787, fax: 9850 6593
http://www.ccms.mq.edu.au
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug