I need to rename a file in a multi-nested directory, that's very long location; I'll use mv
command.
I'd like to save time by typing only once the full location.
Is there a way to shorten the destination directory when moving a file?
I'll explain it better with an example:
mv /dir1/dir2/dir3/dir4/dir5/file.txt /dir1/dir2/dir3/dir4/dir5/moved_file.txt
---> mv /dir1/dir2/dir3/dir4/dir5/file.txt moved_file.txt
cd
to the destination directory, you don't need to provide the full path of the destination file. – aviro Nov 03 '22 at 17:15