assign an arbitrary name or letter to a directory
How can I tell my system that a precise folder, for instance, /home/user/terrible/example, will be called 'myexecs' or 'M' or whatever shortcut?
The idea is to call quickly the bash scripts and files of that folder: $ ls -la myexecs or $ ls -ls M instead of $ ls -la ~/terrible/example Thanks. ______ Fedora Core 3 |
Hi,
export M="/home/user/terrible/example" ls -l $M M is an exported (in case you want to use it in sub shells) variable that holds your dir, and can be used by placing a $ in front of it (see example above). Put it in your .profile (or alike) to make it permanent. Hope this helps. |
also files
Yes, I also wrote my export path at the /home/user/.bashrc file
export M=/home/user/terrible/example and I could call $M after logging out and in. I've tried with files, at they can be called everywhere with the $ symbol!. Thanks! |
Use a symlink:
ln -s ~/terrible/example ~/M |
All times are GMT -5. The time now is 05:34 PM. |