Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-20-2007, 07:09 AM   #1
LQ Newbie
Registered: Jun 2007
Posts: 1

Rep: Reputation: 0
Unhappy How to use "tar" to include./ on the path of the files

I need to modify a LiveCD. I opened the ISO file and found a tar archive, if I open this archive it shows the typical Linux directory structure, but each directory has a leading "./" for example: ./bin, ./etc/, ./usr , etc.

I need to change a script located in ./usr/bin so I can autostart some applications when I boot the LiveCD. I extracted the full tar to a directory, deleted the old script and copied the new one. I "tarred" again the directories, but now they lost the leading "./" and the LiveCD boots but is unable to mount the directory structure.

Is there a way to tell tar (I've used the command line and also the graphical interface Ark on KDE) that puts a leading string to the path of each file?


Old 06-20-2007, 08:20 AM   #2
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Place the following script in an empty directory and run it.


touch alpha
touch beta
touch gamma
tar -cvf i.tar alpha beta gamma
echo ===
tar -tf  i.tar
echo ===
tar -cvf j.tar ./alpha ./beta ./gamma
echo ===
tar -tf  j.tar
You'll get output that looks like this:

Hope this helps.


path, tar, tarballs

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba configuration error when accessing NTFS files " Network path not found" leo_ieo Linux - General 2 10-09-2006 09:55 PM
How to "cp" or "rm" or "tar" all the files except a certain file? cqmyg5 Slackware 7 04-07-2006 03:45 PM
How to install from ".tar.gz" files or from source file in FC3 firewiz87 Linux - Newbie 2 03-05-2006 11:38 AM
Cedega from Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Software 0 03-30-2005 12:24 PM
Cedega and Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Games 0 03-26-2005 03:48 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration