26.10.2012 Views

SUSE LINUX Documentation - Index of

SUSE LINUX Documentation - Index of

SUSE LINUX Documentation - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

102 Start-Up<br />

tar -cvf testarchive.tar test. After that, view the contents <strong>of</strong> the archive<br />

file with tar -tf testarchive.tar. The test directory with all its files and<br />

directories has remained unchanged on your hard disk. To unpack the archive, enter<br />

tar -xvf testarchive.tar, but do not try this yet.<br />

For file compression, the obvious choice is gzip or, for a even better compression ratio,<br />

bzip2. Just enter gzip testarchive.tar (or bzip2 testarchive.tar,<br />

but gzip is used in this example). With ls, now see that the file testarchive.tar<br />

is no longer there and that the file testarchive.tar.gz has been created instead.<br />

This file is much smaller and therefore much better suited for transfer via e-mail or<br />

storage on a USB stick.<br />

Now, unpack this file in the test2 directory created earlier. To do so, enter cp<br />

testarchive.tar.gz test2 to copy the file to that directory. Change to the<br />

directory with cd test2. A compressed archive with the .tar.gz extension can<br />

be unzipped with the gunzip command. Enter gunzip testarchive.tar.gz,<br />

which results in the file testarchive.tar, which then needs to be extracted or<br />

untarred with tar -xvf testarchive.tar. You can also unzip and extract a<br />

compressed archive in one step with tar -xvf testarchive.tar.gz (adding<br />

the -z option is no longer required). With ls, you can see that a new test directory<br />

has been created with the same contents as your test directory in your home directory.<br />

3.1.6 Cleaning Up<br />

After this crash course, you should be familiar with the basics <strong>of</strong> the Linux shell or<br />

command line. You may want to clean up your home directory by deleting the various<br />

test files and directories using the rm and rmdir commands. In Section 3.3, “Important<br />

Linux Commands” (page 106), find a list <strong>of</strong> the most important commands and a brief<br />

description <strong>of</strong> their functions.<br />

3.2 Users and Access Permissions<br />

Since its inception in the early 1990s, Linux has been developed as a multiuser system.<br />

Any number <strong>of</strong> users can work on it simultaneously. Users need to log in to the system<br />

before starting a session at their workstations. Each user has a username with a corresponding<br />

password. This differentiation <strong>of</strong> users guarantees that unauthorized users<br />

cannot see files for which they do not have permission. Larger changes to the system,

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

Saved successfully!

Ooh no, something went wrong!