I am trying to extract a file using this command in the open_data folder:
but it always extract the file back in the home folder.Code:tar xvf archive1.tar ./rayinvr/tramp/amp.f -C ./open_data/
I am trying to extract a file using this command in the open_data folder:
but it always extract the file back in the home folder.Code:tar xvf archive1.tar ./rayinvr/tramp/amp.f -C ./open_data/
From the folks at StackOverflow: http://stackoverflow.com/questions/9...rent-directory
The thread was closed at that answer, but I can't say I have tried it.The problem is that your arguments are in incorrect order. The single file argument must be last.
E.g.
$ tar xvf test.tar -C anotherDirectory/ testfile1
should do the trick.
...
Hope it works for you.
Ubuntu 13.04 (Raring Ringtail)
Bookmarks