- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ALIAS to commands
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
05-25-2001 01:45 AM
05-25-2001 01:45 AM
ALIAS to commands
Is there any way to create an alias except by creating a batch file in /usr/bin ?.
When i type rm, the shell should invoke rm -i how can i do this ?.
Thanks in advance
kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2001 01:50 AM
05-25-2001 01:50 AM
Re: ALIAS to commands
You can put aliases in your $HOME/.profile. For instance:
alias rm='rm -i'
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2001 02:45 AM
05-25-2001 02:45 AM
Re: ALIAS to commands
export ENV=$HOME/.kshrc
and set in $HOME/.kshrc the alias like this:
alias rm='rm -i'
This way when a shell is invoked this file (.kshrc) is executed by the new shell and the alias you set in it will be read also if you initiate a VUE or CDE session via XDMCP.
Federico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2001 03:36 AM
05-25-2001 03:36 AM
Re: ALIAS to commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2001 10:35 PM
05-26-2001 10:35 PM
Re: ALIAS to commands
thanks for the responses....
I tried these solutions on two machines
1.C3600 HPUX 11.0 CDE
It gave me Usage rm -R bla bla error ..... did not work (I am in POSIX shell)
2.C360 HPUX 10.20 CDE
It did not gave me any error but function is not working (POSIX Shell)
Any updates
kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2001 08:57 AM
05-27-2001 08:57 AM
Re: ALIAS to commands
The above responses are correct just a bit incomplete. Since you indicated that you are running CDE you also need to edit your .dtprofile and set DTSOURCEPROFILE=true. This line is usually commented out in .dtprofile. This will cause .dtprofile to in turn execute .profile and the above alias definitions will be included.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2001 11:00 PM
05-28-2001 11:00 PM
Re: ALIAS to commands
i tried that too, the error is something like this
once i start a windows it gives "Usage: rm [-Rfir] file ..." & rm command deletes files w/o a prompt.
Any idea why it is so ?
kaps