LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
  Search this Thread
Old 05-12-2016, 08:05 PM   #1
dtindallsr
LQ Newbie
 
Registered: Mar 2015
Posts: 5

Rep: Reputation: Disabled
Syntax to concatenate multiple file names in a "tar -xvf " command?


What is the syntax to concatenate multiple file names in a "tar -xvf " command?
 
Old 05-12-2016, 08:14 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You mean concatenate the extracted files from a tar archive?
 
Old 05-12-2016, 08:43 PM   #3
dtindallsr
LQ Newbie
 
Registered: Mar 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Syntax to concatenate multiple file names in a "tar -xvf " command?

Please tell me what to replace the ? with for this command. "tar -xvf /dev/st0 file1?file2?file3"
 
Old 05-12-2016, 08:45 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,999

Rep: Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190
Do you have multiple files starting with 'file1' and so on? You can name as many files as you like to be part of the tarred file.
 
Old 05-12-2016, 09:01 PM   #5
dtindallsr
LQ Newbie
 
Registered: Mar 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Syntax to concatenate multiple file names in a "tar -xvf " command?

Do I separate unique file names with a "coma" "space" or some other character?
 
Old 05-12-2016, 09:21 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
A space. However, x means extract, if you want to create a backup on tape then use -c

tar cvf /dev/st0 file1 file2 file3

Not sure exactly what you mean by concatenate multiple files. Yes, basically tar will create an archive file from multiple input files but does not actually concatenate them together.

Last edited by michaelk; 05-12-2016 at 09:31 PM.
 
1 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to manually install "backports-3.11-rc3-1.tar" or ".inf" file from usb ? FondOfLinux Linux - Software 1 08-18-2013 05:20 PM
[SOLVED] Errors executing shell script: "command not found" and "no such file or directory" eko000 Linux - Newbie 1 01-14-2011 07:54 AM
"Invalid tar magic" error msg. when I try to tar ldmud *.tar file in DSL pixxi451 Linux - Newbie 4 07-04-2010 08:32 AM
Replace ":" from multiple files names (even recursively in directories) pepeq Linux - General 3 02-01-2010 11:09 AM
What is the difference between using "jar xvf" and "unzip" to unzip the zip-file? thomas2004ch Linux - Newbie 4 08-27-2009 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration