I am looking for something that I can type to shorten a long path. This path happens to point to a separate hard drive, and I'm hoping that will help.
Background
- Our company has provided us with Ubuntu machines containing a system drive and a larger, faster work drive.
- Company policy says that all software development (meaning compiling of executable code, but not all work) must be done in a specific folder. Our anti-virus software has been configured not to block or quarantine changing executable files within a particular directory structure. Unfortunately (and I'm not sure I follow the details of this part) in order to prevent malware from infecting these whitelisted directories, they are multiple levels deep. In other words, all development work must be done at the end of an arbitrarily long path.
- I have successfully mounted the large hard drive at the path specified by the policy. In other words, the long and arbitrary path points to what (in DOS) I would call the root of the drive.
What I want
- To be able to type
cd foo
and have the OS performcd /my/company/arbitrary/path
- To be able to use other Linux commands for copying / accessing files and get a similar substitution.
- Ideally, though this is not essential, I would like the command prompt to display the shortened form of the path.
My question
- If I use a "symbolic link" or "soft link" to get the OS to perform this substitution automatically, will this meet my needs, or does it have limitations that might affect my workflow down the line? (Reminder: not all my work will be done on this drive.)
- Is there a smarter way of doing this? Can I take advantage of the fact that the path actually "points to" the mount point (or "root") of the physical device?
- Are there additional tricks I can perform to shorten the command prompt to show the user-friendly shorter version of the current working directory when I'm within the work area?