Copying, Renaming, and Moving Files

team bbl


Konqueror allows you to copy, rename, and move directories and files. When you copy or move a directory, all its contents are copied or moved as well.

Highlight a directory or file icon to be copied or moved. Use the Ctrl key or the Shift key with the mouse to select more than one icon. Right-click your highlighted icon(s) and select Cut or Copy to put the file(s) onto the clipboard, similar to the Windows clipboard. You can then Paste the file(s) wherever it's needed. Select Rename to give the file a new name. Copy to and Move to provide a list of directories where you can create a new copy of the file. Select Copy Here when in the target directory.

You can also copy or move a file or directory by dragging it to a new location. For instance, you can highlight a file icon in the right pane of Konqueror and use your mouse to drag it to any folder icon in the left pane of Konqueror. Or to a directory that's open in another window. Or to an application that's open in another window.

You can copy, rename, and move directories and files at the command line using the cp and mv commands. To copy or move a file, type:

 cp path/sourcename path/targetname        (copies a file) cp -r path/sourcename path/targetname     (copies a directory) mv path/sourcename path/targetname        (moves a file or directory) 

After a cp command, two copies of the directory or file exist, with two different names. After a mv command, the source directory or file is gone, only the new copy, targetname, exists. Thus, mv functions as a rename command. The basic rules are:

  • If targetname doesn't exist, a copy of sourcename is created and given the name targetname.

  • If targetname exists and is a file, it is overwritten if sourcename is a file, but not copied at all if sourcename is a directory.

  • If targetname exists and is a directory, a copy of sourcename is written into targetname and given its original name

To copy or move files, your account needs to have write permissions to the directory where you are copying or moving the file or directory.

    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