In Linux and UNIX flavors, mv command has multiple advantages.
1. It can be used for moving the files from one directory to another directory. Like cut & paste option, we usually have on word documents.
2. It can also be used for renaming a file in a given directory.
Let us understand this command practical use cases with below examples.
Rename a file in a directory:
Move a file from one directory to another directory
This mv command will remove the file from present directory and will made available in new directory.
If we check under abclearn_dir1 then file should be removed,
the same file is available under abclearn_dir2.
Move one directory as subdirectory to another
Couple of more options to try
Move only when the SOURCE file is newer than the destination file or when the destination file is missing
-b like --Backup but does not accept an argument