LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 09: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, 09:14 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,397

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
You mean concatenate the extracted files from a tar archive?
 
Old 05-12-2016, 09: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, 09:45 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,552

Rep: Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899
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, 10: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, 10:21 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,350

Rep: Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908
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 10: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 06:20 PM
[SOLVED] Errors executing shell script: "command not found" and "no such file or directory" eko000 Linux - Newbie 1 01-14-2011 08:54 AM
"Invalid tar magic" error msg. when I try to tar ldmud *.tar file in DSL pixxi451 Linux - Newbie 4 07-04-2010 09:32 AM
Replace ":" from multiple files names (even recursively in directories) pepeq Linux - General 3 02-01-2010 12:09 PM
What is the difference between using "jar xvf" and "unzip" to unzip the zip-file? thomas2004ch Linux - Newbie 4 08-27-2009 06:11 AM

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

All times are GMT -5. The time now is 07:21 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration