LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 06: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, 06:14 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

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

Rep: Reputation: 71
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, 06: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-12-2007 11:13 PM
How to capture both stdin and stdout of a child process? jineshkj Linux - Software 2 04-21-2006 06:34 AM
Details of stdin and stdout pixellany Linux - Newbie 1 01-11-2006 01:21 PM
stdout stdin Furlinastis Linux - Newbie 3 08-11-2005 11:00 PM
stdin -> port -> stdout acid_kewpie Linux - Networking 5 04-12-2002 06:01 AM

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

All times are GMT -5. The time now is 08:00 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