LinuxQuestions.org
Help answer threads with 0 replies.
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 06-20-2009, 07:06 PM   #1
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
tar, stdin or stdout


Hi,
tar -cf - /tmp | tar -xvf -

I'm always confused on standard input and standard output. In the above's example the hyphen stands for,
standard output in a creating (-c) tar, and standard input in an extracting (-x) tar
Or is it the other way around?
I mean, While creating the archive its sending the result to standard output and while extracting its getting the content from standard input right?
 
Old 06-20-2009, 07:14 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,703
Blog Entries: 54

Rep: Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964Reputation: 2964
Quote:
Originally Posted by evil_empire View Post
right?
Right.
 
Old 06-20-2009, 07:20 PM   #3
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Well, the pipe between them should give you a hint. It redirects the stdout of the first process to the stdin of the second.
 
Old 06-20-2009, 07:43 PM   #4
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Original Poster
Rep: Reputation: 31
Thanks. Sometimes, I loose confidence on the things I know, I dunno why.
 
  


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
Handling stdin and stdout in a daemon inakizi Programming 4 12-13-2007 12:13 AM
How to capture both stdin and stdout of a child process? jineshkj Linux - Software 2 04-21-2006 07:34 AM
Details of stdin and stdout pixellany Linux - Newbie 1 01-11-2006 02:21 PM
stdout stdin Furlinastis Linux - Newbie 3 08-12-2005 12:00 AM
stdin -> port -> stdout acid_kewpie Linux - Networking 5 04-12-2002 07:01 AM


All times are GMT -5. The time now is 05:21 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration