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
Last revisionBoth sides next revision
copy_move_delete [2016/08/21 11:31] walkeradmincopy_move_delete [2017/01/29 17:57] walkeradmin
Line 1: Line 1:
 ===== Copy Move Delete ===== ===== Copy Move Delete =====
 +<color darkorange>2016</color>
 +
 +----
 +
 \\  \\ 
-\\  +To <color darkred>Copy/Delete</color> a file use <color darkred>cp</color>
-To copy a file or directory use <color darkred>cp</color> +
-\\ +
     To copy a file use:     To copy a file use:
     cp filename path/filename     cp filename path/filename
Line 10: Line 12:
     cp test.txt /home/pi/new     cp test.txt /home/pi/new
 \\  \\ 
 +Copying Directories (and contained files)
     To copy a directory     To copy a directory
     cp -avr source_directory destination_directory     cp -avr source_directory destination_directory
Line 20: Line 22:
 \\  \\ 
 The attributes <color darkred>-avr</color> represent The attributes <color darkred>-avr</color> represent
-\\  
     a   Preserve the specified attributes such as directory and file mode, ownership, timestamps, etc.     a   Preserve the specified attributes such as directory and file mode, ownership, timestamps, etc.
     v   Show results     v   Show results
Line 26: Line 27:
 \\  \\ 
 \\  \\ 
 +To <color darkred>Move</color> use <color darkred>mv</color> 
 +    To Move a file 
 +    mv source destination 
 +     
 +    To move a file called test.txt from /home/pi to /home/pi/tmp 
 +    mv /home/pi/test.txt /home/pi/tmp 
 +     
 +    mv works with directorys too 
 +    To move the folder /home/pi/Trial to the folder /mnt use 
 +    mv /home/pi/Trial /mnt (you may need to sudo depending on destination directory rights) 
 +\\  
 +\\  
 +To <color darkred>Delete</color> use <color darkred>rm</color> 
 +    To Delete a file 
 +    rm filename 
 +     
 +    To delete a directory (even if it is empty) 
 +    rm -R directory 
 +\\  
 +\\ 
copy_move_delete.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1