In order to protect myself if I make a mistake in typing a directory/filename path, I am searching for a way to prevent mv from doing anything if the source and destination files exist on separate partitions.
I see no options in the man page. Google didn't seem to help. Maybe a something like
sourceDrive=something sourceFile destinationDrive=something destinationFile if [ $sourceDrive == $destinationDrive ] mv sourceFile destinationFile fi
I just need to find a way to get the partition the directory/file is on