![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to change Firefox keyboard shortcuts | schallstrom | UNIX for Dummies Questions & Answers | 7 | 08-22-2008 05:45 AM |
| Add keyboard shortcuts with KeyTouch | iBot | UNIX and Linux RSS News | 0 | 05-29-2008 03:20 PM |
| Linking Files in UNIX (shortcuts) | jays337 | UNIX for Dummies Questions & Answers | 3 | 11-15-2006 06:05 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
shortcuts
Hi,
I'm new to this forum, but i'm getting to work on some unix and i like it a lot. I'm trying to figure out a way i can create a shortcut command for a long pathname for example, if i needed to access a file in a particular directory i would type "cd /sampledata/IFS/IFS_DEV/HDC/files/glitter". but instead i just want to type "glitter" at the command line and be able to access the glitter directory. Can someone give me a sample script that would help me accomplish this. Thanks for your help |
|
||||
|
Solution to shortcuts
Well, u can use alias to give that long path any aliasname.
Then after that use "cd aliasname" at ur shell. This will work. Just try it!! For making alias name effective for all ur future sessions.... Edit .profile file and enter that alias command there..... |
|
||||
|
shortcuts
[sd12@phenix sd12]$ cat .bash_profile
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH unset USERNAME alias disk 'cd /sam/dir1/disk' This is the alias script i used. but i get an error message when i type disk at the command line. it is not taking me to that the file disk. [sd12@phenix sd12]$ disk bash: disk: command not found Also i get this error message when i log in bash: alias: disk: not found bash: alias: cd /sam/dir1/disk: not found Can someone please enlighten. Thank you |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|