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:
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.
Tar looks at /dev/tape by default. You must use the -f switch to look at a different file.
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. :-(
|All times are GMT -5. The time now is 04:17 AM.|