A coworker who is no longer on my help desk team tested a redirect script on my MacBook that moved my home folders in to my Box Sync folder to sync those folders to the cloud.
An excerpt of the script he ran is as follows:
#!/bin/bash
home="/Users/$USER"
sudo mv $home/Documents $home/Box\ Sync/ && ln -s $home/Box\ Sync/Documents $home/Documents
I have a limited knowledge of Bash. I want to move the directory to its default location in the home folder (ex: /Users/$USER/Documents).
Would the correct way to do this be the following?
#!/bin/bash
home="/Users/$USER"
sudo mv $home/Box\ Sync/Documents $home/Documents
It seems simple enough but I don't know if I should do anything about the ln -s bit in the original script. I believe thats what links the original location to the new location. Please correct me if I'm wrong.