- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cannot unlink: Text file busy
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
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
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
тАО03-20-2009 12:34 PM
тАО03-20-2009 12:34 PM
cannot unlink: Text file busy
please suggest for the following issue:------
(1)I am planning to move /etc/opt/resmon/lib/libxerces-c.sl.23 to other dir and create a soft link so that i can make free space in root , but while moving mention file it gives me error
" mv: libxerces-c.sl.23: cannot unlink: Text file busy "
(2) I believe some" unknow file " is already linked to /etc/opt/resmon/lib/libxerces-c.sl.23 due to which it not allowing me to move or Is there are any other reason ?
....how to find the unknow file or source file linked to this file.
Thanks in advance.
Subodh.
- Tags:
- ETXTBSY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 12:46 PM
тАО03-20-2009 12:46 PM
Re: cannot unlink: Text file busy
a -> b, you can delete either w/o an issue.
The file noted is part of an xml parser, and it appears that you have, or a the time had, an application running that needed it, hence the "busy". "fuser" might tell you which app, or better stil "lsof". stop the app, move it and but the symbolic link in place.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 12:49 PM
тАО03-20-2009 12:49 PM
Re: cannot unlink: Text file busy
You must use 'mv' to rename the old executable to a new name. This _MUST_ be done within the filesystem in which the file resides. Otherwise 'mv' becomes a copy ('cp'). For example:
# mv /etc/opt/lib /etc/optlib.old
# cp /root/newlib /etc/opt/lib
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 12:56 PM
тАО03-20-2009 12:56 PM
Re: cannot unlink: Text file busy
I assume you are moving the whole lib directory? Note if you move it off of root, you won't be able to run that application in single user mode.
>mv: libxerces-c.sl.23: cannot unlink: Text file busy
As OldSchool said, this means some program is using that shlib.
You can move that shlib anywhere else in that filesystem but you can't remove it until that process exits.
What does "bdf /etc/opt/resmon/lib" show?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 01:09 PM
тАО03-20-2009 01:09 PM
Re: cannot unlink: Text file busy
The correct command for replacing busy load modules is "ln -f":
# cp .../liba /etc/opt/liba.new
# ln -f /etc/opt/liba /etc/opt/liba.old
# ln -f /etc/opt/liba.new /etc/opt/liba
# rm /etc/opt/liba.new # if you want
This minimizes the window where /etc/opt/liba is missing, which is important if you are replacing dld or libc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 01:27 PM
тАО03-20-2009 01:27 PM
Re: cannot unlink: Text file busy
Thanks for quick reply.
please find the o/p
(1)# bdf /etc/opt/resmon/lib
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 262144 243496 18648 93% /
(2)# fuser -cu libxerces-c.sl.23
libxerces-c.sl.23: fuser: could not find file system mounted at libxerces-c.sl.23.
fuser not giving idea which appln is makingn this file busy...all file are resides in root FS and by moving this i planning to make it free ....
(3)
a -> b now a is linked to b
we can check link by using ls -l of source file of " a " ....but if "a " is unknown then how to check ? in my case i know the path of "b" but donnt know the location of "a" ..or path of a
please suggest ..
Thanks once again...
subodh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 01:48 PM
тАО03-20-2009 01:48 PM
Re: cannot unlink: Text file busy
/dev/vg00/lvol3 ... /
You can move/ln the shlib anywhere in /, /etc, /etc/opt, ...
>(2)# fuser -cu libxerces-c.sl.23
libxerces-c.sl.23: fuser: could not find file system mounted at libxerces-c.sl.23.
Try an absolute path? lsof would be better.
>resides in root FS and by moving this i planning to make it free
How much space are you talking about? Unless it is 100s of Mb, it may be a waste of time.
>(3) a -> b now a is linked to b
>we can check link by using ll of source file of "a" .... but if "a" is unknown then how to check?
This question won't help because it isn't your issue. The only "link" involved is the normal link of every file in their directory.
What does "ll -i" show for a or b?
If the link count isn't more than 1, there are no extra hardlinks.
To find the hardlink(s):
find filesystem -inum number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 02:19 PM
тАО03-20-2009 02:19 PM
Re: cannot unlink: Text file busy
This is the ll(1) format for symlinks. Are you asking about them and not hardlinks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 03:22 PM
тАО03-20-2009 03:22 PM
Re: cannot unlink: Text file busy
"and create a soft link..." &
"I believe some" unknow file " is already linked"
Based on that, I assumed he meant Symbolic Link, and that's what I attempted to illustrate with:
"a -> b, you can delete either w/o an issue."
However, from your description, that isn't your issue, even though you keep coming back to it, rather the file noted *IS IN USE*
If, however, you are concerned that there is a *Hard* link somewhere, as noted above, you need to list the i-node number of the file, then use "find" as noted above to locate other instances of that i-node.
Note that if there is/are hardlinks in place, then deleting one will delete all. I believe, but can't prove, that fuser will show the file in use based on the i-node.
Read Dennis' post about cp / ln / rm procedure in dealing w/ this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 03:23 PM
тАО03-20-2009 03:23 PM
Re: cannot unlink: Text file busy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2009 03:46 PM
тАО03-20-2009 03:46 PM
Re: cannot unlink: Text file busy
No, deleting one will just decrement the count. When it goes to zero and there isn't any access, the file will be removed. But if it has text busy, you can't remove that last link. That's why "ln -f" works.
>I believe, but can't prove, that fuser will show the file in use based on the i-node.
I don't think fuser(1m) is smart enough to find text busy type of access?
And should be trivial to prove, see if libc or $SHELL is in use.