Summary


In this lesson you learned more file management skills, which will serve as building blocks for the next few chapters in which you will learn to read and edit files.

At this point, you should be able to log into your Unix system and manage the locally stored data on it, and to move, copy, and delete data files.

In the next lesson we will learn how to read files and continue to build our Unix file management and navigational skills so that you can work with Unix more productively.

In this lesson you learned a set of flexible set of Unix commands that will allow you to manage the data stored on your system.

The following is a quick review of this lesson:

  • touch The touch command sets the modification date of the file to the current time. This has the effect of creating new empty files if you need them.

  • rm The rm command removes files. Use the rm -i option until you are quite certain that you know what you are doing, and then keep using it for a while longer. Recursive rm running in non-interactive mode can wipe out your entire disk.

  • cp The cp command copies one or more files. Although a slight oversimplification, it's easiest to remember that if you start with a single file, your destination needs to be a single file; if you start with multiple files, your destination must be something that can hold multiple files (such as a directory). You can also copy a single file to a directory if you want to.

  • mv The mv command works a lot like cp, only it renames or moves files. The mv command cannot move directories across physical hardware boundaries, so every now and then Unix's hardware abstraction fails with this command. If this happens, look to the cp command for help.

  • ln The ln command creates alternative names by which a file or directory can be accessed. It's convenient for times when you need one file to appear to be in several different places, or when you need to make information that comes from different files at different times all appear under the same filename.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net