![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to change Firefox keyboard shortcuts | schallstrom | UNIX for Dummies Questions & Answers | 7 | 08-22-2008 01:45 AM |
| Add keyboard shortcuts with KeyTouch | iBot | UNIX and Linux RSS News | 0 | 05-29-2008 11:20 AM |
| Linking Files in UNIX (shortcuts) | jays337 | UNIX for Dummies Questions & Answers | 3 | 11-15-2006 03:05 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
man the alias command.
|
|
#3
|
|||
|
|||
|
shortcuts
yes, but i think that just gives it an assigns it a name. It does not actually execute the command from one directory and take me to that location as specified by the actual path name
|
|
#4
|
|||
|
|||
|
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..... |
|
#5
|
|||
|
|||
|
1) find in your root directory the following file
.cshrc or .cshrc.user(hidden files) 2) in this file add the following line. alias glitter 'cd /sampledata/IFS/IFS_DEV/HDC/files/glitter') |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
||||
|
||||
|
if you're modifying '.profile':
Code:
alias disk='cd /sam/dir1/disk' and don't forget to 'source' your '.profile' file after modifying it: Code:
. ~/.profile |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|