Results 1 to 3 of 3

Thread: Linux Tar usage question

  1. #1
    Join Date
    Jan 2008
    Location
    PVD, USA
    Beans
    240
    Distro
    Xubuntu 14.04 Trusty Tahr

    Question Linux Tar usage question

    I have a question on 'tar' usage.

    I have a dozen tarballs, (*.tar.gz) in these files is 5-10 text files. These text files do not have an extension, not that it really matters, but I would like to add (.txt) to each.

    What I would like to do is put all these text files uncompressed into one big file or folder with one 'tar' command. I looked over the man page and the corresponding website but I am still a little confused.

    Any help?

  2. #2
    Join Date
    Oct 2008
    Location
    London, England
    Beans
    47
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Linux Tar usage question

    What's the point of tar if you want them uncompressed? Wouldn't a directory do it?

  3. #3
    Join Date
    Jan 2009
    Beans
    128

    Re: Linux Tar usage question

    put all your gzipped tarballs in one folder by themselves, and create a destination folder

    tar -zxvf * DESTINATION

    cd DESTINATION

    for file in *; do mv $file $file.txt; done
    "In theory there is no difference between theory and practice. But, in practice, there is." --Yogi Berra

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •