Skip to main content
added 14 characters in body
Source Link
user601
user601

with bash:

~foo is reserved for the home directory of the user foo. I would not recommend creating users just for that convenience.

You can make your life easier (or harder) when changing directories by setting the CDPATH environment variable (look it up in bash(1)).

Apart from that, the only way to think of would be to set environment variables for those directories you want to abbreviate.

$ FOODIR=/var/lib/misc $ cp ~/bar.txt $FOODIR 

~foo is reserved for the home directory of the user foo. I would not recommend creating users just for that convenience.

You can make your life easier (or harder) when changing directories by setting the CDPATH environment variable (look it up in bash(1)).

Apart from that, the only way to think of would be to set environment variables for those directories you want to abbreviate.

$ FOODIR=/var/lib/misc $ cp ~/bar.txt $FOODIR 

with bash:

~foo is reserved for the home directory of the user foo. I would not recommend creating users just for that convenience.

You can make your life easier (or harder) when changing directories by setting the CDPATH environment variable (look it up in bash(1)).

Apart from that, the only way to think of would be to set environment variables for those directories you want to abbreviate.

$ FOODIR=/var/lib/misc $ cp ~/bar.txt $FOODIR 
Source Link
user601
user601

~foo is reserved for the home directory of the user foo. I would not recommend creating users just for that convenience.

You can make your life easier (or harder) when changing directories by setting the CDPATH environment variable (look it up in bash(1)).

Apart from that, the only way to think of would be to set environment variables for those directories you want to abbreviate.

$ FOODIR=/var/lib/misc $ cp ~/bar.txt $FOODIR