- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Starting hpterm with automatic change to a specifi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 12:40 AM
02-10-2004 12:40 AM
I'm tired always to input 'cd verylongpathanddirectoryname' to change to a directory which I need very often.
To avoid this, I tried to write a script with a hpterm command using the options -e to start a subsequent script which execute cd, but this was not successful.
Who can help?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 12:45 AM
02-10-2004 12:45 AM
Re: Starting hpterm with automatic change to a specified directory
#!/bin/sh
cd /verylongplace
sh
That would probably work but never fear, aliases are here
alias "mycd=cd /extremelylongpath"
If you put the above in your .profile/.xsession/.anything that gets read before you login, you will be able to type "mycd" and you'll be there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 12:48 AM
02-10-2004 12:48 AM
Re: Starting hpterm with automatic change to a specified directory
Hi, how about putting 'cd /alongpathname' into your ~/.sh_rc or whatever shell u use!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 12:48 AM
02-10-2004 12:48 AM
Re: Starting hpterm with automatic change to a specified directory
Start the hpterm with the -ls option:
This option indicates that the shell that is started in the
hpterm window should be a login shell (i.e. the first
character of argv[0] will be a dash, indicating to the shell
that it should read the user's /etc/profile and .profile (for
ksh and sh) or /etc/csh.login and .login (for csh). This
option is ignored when the -e option is also used. Associated
resource: *loginShell.
and set the cd in the users .profile or set a var that inclustes this path.
HTH,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 12:50 AM
02-10-2004 12:50 AM
Re: Starting hpterm with automatic change to a specified directory
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 12:52 AM
02-10-2004 12:52 AM
Re: Starting hpterm with automatic change to a specified directory
Another quick way is to complete your 'cd' command with the 'escape key' sequence. Instead of typing:
# cd verylongpathanddirectoryname
Type:
# cd ver (and press the escape key twice so that it will complete the rest of the directory or file name. If there is multiple entries start with the same string, this won't work unless you are more specific).
This is just a quick way of completing PATH and long file names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 01:01 AM
02-10-2004 01:01 AM
Solution#!/usr/bin/sh
cd verylongpathanddirectoryname && exec hpterm
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 06:26 PM
02-10-2004 06:26 PM
Re: Starting hpterm with automatic change to a specified directory
2) Input the directory that you want to cd to in the file. i.e alias longdir='cd verylongpathanddirectoryname'
3) Add this line in your .profile :
export ENV=.alias.ksh
With a new session, when you want to go to the long directory. Just type longdir!