- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Can a soft link be created for an option of a comm...
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-29-2003 03:22 AM
05-29-2003 03:22 AM
Can a soft link be created for an option of a command
Is it possible for me to create a soft link for an option of a command.
Eg: I can use "ln -s /sbin/ls my_ls" for creating a soft link for ls as my_ls in my current directory.
Now suppose I want to creat a soft link for ls -l explicitly. I mean i want an executable which has the functionality of ls -l is it possible.
I know this can be done in a simple manner with the alias command. But for curiosity I would like to know is there a method with ln
Cheers!!!!
Dipu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 03:25 AM
05-29-2003 03:25 AM
Re: Can a soft link be created for an option of a command
Sorry, no. There is no place within the inode to store the information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 03:26 AM
05-29-2003 03:26 AM
Re: Can a soft link be created for an option of a command
It sounds to me that what you really need is an alias. In your "shrc" file for your shell, put the following line:
alias my_ls="ls -l"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 04:08 AM
05-29-2003 04:08 AM
Re: Can a soft link be created for an option of a command
If at all you want to do this, you can write simple one line scripts, which would internally invoke the commands in the specified directory with necessary arguments.
For example,
1> the contents of my_ls could be
/usr/bin/ls -l | pg
2> the contents of my_top could be
/usr/bin/top -m 10
3> A typical my_iostat would look like
iostat 1 10
These tools would prove handy in the long run.
I would follow this practice but with shorter command names.((;~))
Regards'
Suhas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 04:34 AM
05-29-2003 04:34 AM
Re: Can a soft link be created for an option of a command
So the following works:
ln -s "/usr/bin/ls" xyz
./xyz
While doing this fails:
ln -s "/usr/bin/ls -l" xyz
./xyz
-bash: ./xyz: No such file or directory