You can use Linux command mv to move files or directories from one location to another. You need to provide the full or relative path of the files/directories of source and destination.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
mkdir mydir{1..4} ## create four files and directories touch myfile{1..4} ls ## returns mydir1 mydir2 mydir3 mydir4 ## myfile1 myfile2 myfile3 myfile4 mv myfile1 mydir1 ## moves myfile1 inside mydir1 ls mydir1 ## returns myfile1 mv mydir3 mydir4 ## moves mydir3 inside mydir4 ls mydir4 ## returns mydir3 mv mydir1/myfile1 mydir4/mydir3 ## moves myfile1 from mydir1 to mydir3 ls mydir4/mydir3 ## returns myfile1 rm -r my* |