User Tools

Site Tools


copy_move_delete

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
copy_move_delete [2016/08/21 11:24] walkeradmincopy_move_delete [2016/08/21 11:34] walkeradmin
Line 2: Line 2:
 \\  \\ 
 \\  \\ 
-To copy a file or directory use <color darkred>cp</color> +To <color darkred>Copy/Delete</color> a file use <color darkred>cp</color>
-\\ +
     To copy a file use:     To copy a file use:
     cp filename path/filename     cp filename path/filename
Line 9: Line 8:
     To copy the file test.txt to the folder /home/pi/new     To copy the file test.txt to the folder /home/pi/new
     cp test.txt /home/pi/new     cp test.txt /home/pi/new
 +\\ 
 +Copying Directories (and contained files)
 +    To copy a directory
 +    cp -avr source_directory destination_directory
 +    
 +    To copy the directory /home/pi/dir1 to the folder /home/pi/test
 +    cp -avr /home/pi/dir1 /home/pi/test
 +    
 +    Now you will have a /home/pi/test/dir directory
 +\\ 
 +The attributes <color darkred>-avr</color> represent
 +    a   Preserve the specified attributes such as directory and file mode, ownership, timestamps, etc.
 +    v   Show results
 +    r   Recursive, action all subfolders and files.
 \\  \\ 
 \\  \\ 
 +To <color darkred>Move</color> use <color darkred>mv</color>
copy_move_delete.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1