LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Thread Tools Search this Thread
Old 08-18-2005, 12:59 PM   #1
rocky180
LQ Newbie
 
Registered: Aug 2005
Posts: 3
Thanked: 0
how to tar dot files?


[Log in to get rid of this advertisement]
Hi,

Was just wondering how to tar . files? Cos I heard that it doesn't!

Rocky180
rocky180 is offline     Reply With Quote
Old 08-18-2005, 01:34 PM   #2
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669
Thanked: 0
Do you mean hidden files and directorys
Boow is offline     Reply With Quote
Old 08-18-2005, 01:37 PM   #3
rocky180
LQ Newbie
 
Registered: Aug 2005
Posts: 3
Thanked: 0

Original Poster
Yes I do mean hidden files and directories.

Am interested in making sure everything is backed up from a specific point all the way in.

Rocky180
rocky180 is offline     Reply With Quote
Old 08-18-2005, 01:49 PM   #4
rnicolson
Member
 
Registered: Jul 2004
Location: Winnipeg
Distribution: Slackware 11
Posts: 74
Thanked: 0
If you are doing an entire directory you can do this;

tar cfv test.tar test/

This will create test.tar containing the entire directory test which has hidden files in it.

$ tar cfv test.tar test/
test/
test/test
test/.test1

was the output from my test of this command.
rnicolson is offline     Reply With Quote
Old 08-18-2005, 01:49 PM   #5
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669
Thanked: 0
yes tar will archive every thing in a directory hidden stull as well.
Boow is offline     Reply With Quote
Old 08-18-2005, 02:06 PM   #6
rocky180
LQ Newbie
 
Registered: Aug 2005
Posts: 3
Thanked: 0

Original Poster
Yes all good, even tested it myself.

Thanks.

I wonder why one of my bosses has spent ages redeveloping the wheel as he was under the impression that tar didn't do hidden file, which in turn made me beleive it didn't either.

Anyways there must be a reason.

Thanks again.

Rocky180.

ps. Is there a way to close the thread?
rocky180 is offline     Reply With Quote
Old 08-22-2007, 04:54 AM   #7
whittycat
LQ Newbie
 
Registered: Nov 2004
Location: Wellington Somerset UK
Distribution: Debian lenny, also DSL-N
Posts: 26
Thanked: 0
tar usually archives hidden files and directories but there is one way it might not. If you run tar from within the directory like this

cd test
tar cf ../test.tar *

the the hidden files don't get archived. That may be what the boss was doing. It is not too surprising since with

ls -R *

you don't get them so it is the natural way to understand *.
whittycat is offline     Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RSYNC and dot files Buto Linux - General 1 09-22-2005 03:39 PM
Strip leading dot in filepaths (in tar archive) EcceVery Debian 2 04-13-2005 08:47 PM
proftpd and dot files bsmith Linux - General 1 05-14-2004 03:55 AM
useradd not accepting dot so i am not able to use dot in mail id hanu_raob Linux - General 5 05-13-2004 08:04 AM
Samba won't hide dot files josephswagner Linux - Software 1 02-25-2003 09:25 AM


All times are GMT -5. The time now is 05:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration