Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Piped files ?? 1

Status
Not open for further replies.

mpramods

Technical User
Jun 3, 2003
50
US
I had an interview and was asked a question as follows:

'If you have a 100 MB file that u need to ftp to another unix server & process it, but the server has only 10 MB space left, how can you do it'. The interviewer was saying something about Piped files if I am not wrong.

Can somebody please let me know how the above can be achieved. Also what are piped files in unix.

Thanks,
Pramod.
 
Interesting. And you need to process the file on the remote server with 10Mb free space?

Would the result of 'processing' be less then 10Mb?

Oh, by the way, speaking of the interviews - here's one of my favorit Steven Wright's quotes:
I was in a job interview and I opened a book and started reading. Then I said to the guy, "Let me ask you a question. If you are in a spaceship that is traveling at the speed of light, and you turn on the headlights, does anything happen?" He said, "I don't know." I said, "I don't want your job."
-- Steven Wright

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
I was also not sure what to say for this question.

What about Piped files? What is this concept?

Thanks,
Pramod
 
man mkfifo or man mknod for the p option.
On the remote server create a named pipe, say /tmp/mypipe and launch the processing program, something like this:
tail -f /tmp/mypipe | program arguments
On the local server, within a ftp session do something like this:
put localbigfile /tmp/mypipe
Provided the processing of the 100Mb file will not exceed 10Mb of output, your goal is achieved.


Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top