- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- root can't vi or more on a file
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-11-2004 07:52 AM
02-11-2004 07:52 AM
root can't vi or more on a file
here is the infor on this file, xyz
lrwxrwxrwx 1 root root .... xyz
any idea?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 07:56 AM
02-11-2004 07:56 AM
Re: root can't vi or more on a file
That file is a symbolic link. You need to edit the file it points to.
BUT it still should have let you edit it IF you're root.
I suspect that the file it linked to is now gone. Check to see if the link destination still exists.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:00 AM
02-11-2004 08:00 AM
Re: root can't vi or more on a file
Is this link pointing to a NFS mount which is not exported with correction options?.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:11 AM
02-11-2004 08:11 AM
Re: root can't vi or more on a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:18 AM
02-11-2004 08:18 AM
Re: root can't vi or more on a file
it doesn't look like a soft link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:23 AM
02-11-2004 08:23 AM
Re: root can't vi or more on a file
If the destination files doesn't exist, it will create one.
Looking at the information given by you, a hardlink will have the count 2. Yours is a symbolic link created with ln -s. It should have been something like this
lrwxr-xr-x 1 root sys 5 Feb 11 15:22 file2 -> file1
The file next to -> is the destination. Can you post the entire string (ll file)?
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:30 AM
02-11-2004 08:30 AM
Re: root can't vi or more on a file
lrwxrwxrwx 1 root root 20 Feb 11 15:45 xyz
If it was soft link, would I get permission denied, if the destination is gone?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:33 AM
02-11-2004 08:33 AM
Re: root can't vi or more on a file
if I remove the destination file, the symblyc link should be still shown, and you will get the message of "no such file or directory".
But, in this case, I got "permission denied", and there is no link shown here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:40 AM
02-11-2004 08:40 AM
Re: root can't vi or more on a file
ln -s " " foo
you still get
lrwxrwxr-x 1 root sys 1 Feb 11 15:38 foo ->
Nothing being pointed to, BUT you still get the arrow.
So this is weird.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:44 AM
02-11-2004 08:44 AM
Re: root can't vi or more on a file
#ll > ll.out
#cat -v ll.out
and watch for any misterious characters corresponding to this link.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:45 AM
02-11-2004 08:45 AM
Re: root can't vi or more on a file
What do the following commands show?
#file xyz
#getacl xyz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:49 AM
02-11-2004 08:49 AM
Re: root can't vi or more on a file
sytems: cannot open
getacl systems
sh: getacl: not found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:54 AM
02-11-2004 08:54 AM
Re: root can't vi or more on a file
In my above example of linking to "nothing" a file foo gives cannot open.
BUT a what foo gives
can't open foo (26)
And according to errno.h 26 is ETXTBSY Text file busy....hmmmm....
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:54 AM
02-11-2004 08:54 AM
Re: root can't vi or more on a file
If you have getacl... it's /usr/bin/getacl. Sorry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 08:56 AM
02-11-2004 08:56 AM
Re: root can't vi or more on a file
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 09:01 AM
02-11-2004 09:01 AM
Re: root can't vi or more on a file
how do i find if the file is/was pointing to pipe, socket,...
Can we conclude that the file has been corrupted? therefore I can just try to remove it since there is no way to recover it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 09:03 AM
02-11-2004 09:03 AM
Re: root can't vi or more on a file
Use 'cat -v' to see if any of the special characters associated with it.
#ll > ll.out
#cat -v ll.out
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 09:10 AM
02-11-2004 09:10 AM
Re: root can't vi or more on a file
I did that.
The name of the file should be correct, and should not have any control characters in it, otherwise, I will get the message like "the file is not found".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 12:46 PM
02-11-2004 12:46 PM
Re: root can't vi or more on a file
This may not be the best idea but assuming the file system is vxfs, I did find that you can do an `ls -i` to get the inode and run:
`echo "DDDi;+80B;p 96 c" | fsdb -F vxfs
!!! SEVERE WARNING !!! - per the HP manpage, [ failure to use fsdb correctly ] can lead to complete destruction of the file system and total loss of data.
... but that aside, the command above is not changing anything, merely going to the inode, seeking 80 bytes ahead, and then printing the following 96 bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 02:48 PM
02-11-2004 02:48 PM
Re: root can't vi or more on a file
But seriously - he has a valid point - hunting this dog down's looking like fsdb is the a viable tool for the job.
But it also looks like rm is the *proper* tool for the job, huh Hanry.
I gotta admit I love the hunt more than most, but it sounds to me like there's not many options Hanry.
My $0.02,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 09:06 PM
02-11-2004 09:06 PM
Re: root can't vi or more on a file
What about an fsck? Everyone agrees it's a strange phenomenon, so better try and repair it.
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2004 09:26 PM
02-11-2004 09:26 PM
Re: root can't vi or more on a file
This would walk the symbolic link (if it is a symlink) and show the real filename. Since something strange is happening with the result of the ls output, you should pipe it through the cat -t (-t will output tab characters as ^I).