Creating Directories, Files, and Links

team bbl


You can create new directories, files, and links from your desktop using Konqueror. In Konqueror, navigate to the directory that is to house your new item. Click Edit and select Create New. A menu of items you can create is opened, including:

  • Directory: Type the directory name.

  • HTML File: Type the filename. The new file contains skeleton HTML code.

  • Text File: Type the filename.

  • Link to Application: Similar to a Windows shortcut. Clicking the link starts the application. In the first screen displayed, type the name of the link. Then select the Execute tab. In the Execute screen, type the command to start the application or click the Browse button to select the application.

  • Link to Location: Shortcut to a location. When you click the link, the location opens in Konqueror. In the screen displayed, type a filename for the link. Type the URL to the location or click the Browse button to navigate to the URL.

Names can be up to 255 characters. Linux accepts almost any character in a filename, but some characters have a special meaning to the Linux shell and complicate your life when used in a filename. It's best to use only letters, numbers, underscores, hyphens, and dots in filenames. Upper- and lowercase letters are not the same (file1 is not File1). Filenames don't need to have an extension, although many applications use specific extensions. Technically, the dot is just another character, so you could name a file something like file.test.mine. Special system files have names that begin with a dot, so don't use a dot to begin filenames for other types of files.

You can create a directory in any directory where you have write permission using the command line mkdir command:

 mkdir path/dirname 

If your path includes directories that don't yet exist, you can create them in one command with the -p option, as follows:

 mkdir -p /usr/local/newparent/mydir 

If newparent doesn't exist, it's created, then mydir is created inside newparent.

Files can be created by applications, such as a word processor. File editors create and edit plain text files, as Notepad does on Windows. Links can be created at the command line using the ln command (see Appendix A).

    team bbl



    Spring Into Linux
    Spring Into Linux
    ISBN: 0131853546
    EAN: 2147483647
    Year: 2005
    Pages: 362
    Authors: Janet Valade

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