-   Linux - Newbie (
-   -   cat /path/to/openMosix-2.4.16-3.gz | gzip -d | patch -p1 -l what does it mean? (

Niceman2005 02-24-2005 06:48 PM

cat /path/to/openMosix-2.4.16-3.gz | gzip -d | patch -p1 -l what does it mean?
Dear people,

I have read the man page of "cat' but still don't quite understand what it does.

say for the command:
cat /path/to/openMosix-2.4.16-3.gz | gzip -d | patch -p1 -l

what does the above actually do?

Thanks a million for helping!

ToniT 02-24-2005 07:13 PM

To understand that command (or script), you also have to read manpages of
gzip and patch too.

That command consists of tree separate processes.
  • First one prints the contents of /path/to/openMosix-2.4.16-3.gz to
    the "stream" (in basic case, to the screen, but in this case to input of the next process).
  • The second process (gzip -d). Reads compressed data from the input stream (in a basic case, this would be the keyboard), decompresses and writes the decompressed version to the stream.
  • The third process reads difference-information (aka diff, or patch-file. Normally generated with a program called diff) from the input stream and tries to do those changes described to the files in the system (eg tries to apply a patch).

To make long story short, those three programs together uncompress and apply a patch to your files.

Niceman2005 02-24-2005 08:34 PM

Hi ToniT

Thanks a lot for your kind explanation. very veyr much!

All times are GMT -5. The time now is 08:26 PM.