Combining Commands

As we’ve shown you in this chapter, you use separate commands to encode/unencode, tar/untar, compress/uncompress, and zip/ unzip files and directories. A lot of times, however, you can pipe commands together and run them in sequence, saving you time and hassle. For example, as Code Listing 13.14 shows, you can uudecode and gunzip files at the same time by piping the commands together. You can also uncompress and untar at one time, and you can tar and gzip at one time.

To uudecode and gunzip at One Time:

1.
ls -l h* Use ls -l to verify the existence of your uuencoded and zipped file.
2.
uudecode -o /dev/stdout home.gz.uue → | gunzip > home Here, we use -o /dev/stdout to send the uudecode output to the standard output, then ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.