LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux 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
 
LinkBack Search this Thread
Old 10-29-2002, 11:27 AM   #1
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Rep: Reputation: 30
tar and CSV


I want to create a database of the contents of my tarfiles. I read that I can list the contents of an archive by typing:

tar -t thisarchive.tar (or use --list instead of -t)

But, when I ran the above, my terminal just sat there silently.

I want to generate a CSV file with:
$tarfile_name,$file1_in_archive
$tarfile_name,$file2_in_archive
etc.

and then import the resulting CSV into a MySQL table that I have created.

I thought using tar -t would be a good starting place to build this kind of thing. But, even if I can figure out the -t or --list options, I have never written a shell script and don't know regular expressions, so I'm unable to implement my idea.

If anybody could give me a brief description of the basic components I will need to learn and use, then point me to more detailed (though learner-friendly!) coverage of same, I would be grateful.

Thanks!
 
Old 10-29-2002, 12:23 PM   #2
akohlsmith
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 114

Rep: Reputation: 15
Tar looks at /dev/tape by default. You must use the -f switch to look at a different file.

e.g.
tar -cyvf myfile.tar.bz2 /path/to/what/to/archive/
tar -xyvf myfile.tar.bz2 -C /where/to/put/the/files
tar -tyvf myfile.tar.bz2

For backup logging, I just use FlexBackup. Google should find it for you. Works with tapes, files, whatever. Does multi-level backups, multiple backups on one tape, etc.

I like it a lot. Too bad it's no longer maintained. :-(

Last edited by akohlsmith; 10-29-2002 at 12:24 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 10 02-23-2008 05:40 AM
default application for .csv ahz10 Linux - Software 2 11-04-2005 03:24 PM
help editing .csv files schneidz Programming 7 06-11-2005 04:09 PM
Mysql CSV problems farmerjoe Linux - General 2 11-13-2004 11:21 AM
CSV File AMMullan Programming 2 11-10-2003 12:49 AM


All times are GMT -5. The time now is 11:39 AM.

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.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration