Chapter 13. Working with Files

IN THIS CHAPTER

  • Listing, copying, and moving files

  • Finding files

  • Viewing files and file types

  • Compressing files

  • Working with archives

  • Using file attributes and ACLs

In a way, "Working with Files" could have been the title of this whole book. After all, just about everything you do with your system is working with files. In fact, traditionally, "the Unix philosophy" states that everything is a file, and it's almost true.

In this chapter we look at some of the common tools for examining and manipulating files. We also look at working with the most common file formats and compressing and archiving files. Finally, we touch on issues surrounding file attributes and access control lists (ACLs).

Listing, Copying, and Moving Files

We covered the fundamental concepts of listing, copying, and moving files in Chapter 2. In this section, we review those concepts and expand on them slightly.

The Command-Line Tools

You can list files at the command line with the ls command, or you can use commands such as mv or rm to work with those files.

Tip

On SUSE systems, the command dir is usually an alias for ls -l. (This is defined in the global bash configuration file and is useful for refugees from another operating system.)

Using ls

The command ls lists files and directories. We doubt that many people know all of the options to the ls command, and we shall certainly not list them all here. If you're curious, read the man page (man ls) or, better, the info pages (info coreutils ls). But ...

Get Open SUSE® 11.0 and SUSE® Linux® Enterprise Server Bible 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.