13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.3 Basic <strong>Linux</strong> C<strong>on</strong>cepts and Commands27• c: Create an archive.• x: Extract from an archive.• t: Get a table of c<strong>on</strong>tents.In additi<strong>on</strong>, you’ll want to know these opti<strong>on</strong>s:• f: The next parameter is the filename of the archive.• v: Provide more verbose output.Using these opti<strong>on</strong>s, Table 1.4 shows examples of each of the basicfuncti<strong>on</strong>s.Now let’s do the same thing using the zip command (Table 1.5). Thereare actually two commands here—<strong>on</strong>e to compress the files into an archive(zip), and the other to reverse the process (unzip).Table 1.4 Examples of the tar commandCommandtar tvf packedup.tartar xvf packedup.tartar cvf packedup.tar mydirExplanati<strong>on</strong>Gives a table of c<strong>on</strong>tents, in l<strong>on</strong>g (or verbose) form.Without the v, all you get is the filenames; with the vyou get additi<strong>on</strong>al informati<strong>on</strong> similar in format to thels -l command.Extracts all the files from the TAR file, creating themaccording to their specified pathname, assuming youruser ID and file permissi<strong>on</strong>s allow it. Remove the vopti<strong>on</strong> if you d<strong>on</strong>’t want to see each filename as the fileis extracted.Creates a TAR archive named packedup.tar fromthe mydir directory and its c<strong>on</strong>tents. Remove the vopti<strong>on</strong> if you d<strong>on</strong>’t want to see each filename as the fileis added to the archive.letter opti<strong>on</strong>s. Newer POSIX versi<strong>on</strong>s of UNIX and the GNU tools, which means all flavorsof <strong>Linux</strong>, also support l<strong>on</strong>ger full-word opti<strong>on</strong>s prefixed with a double minus, as in --extractinstead of x or -x.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!