- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: copy lib 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
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
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
тАО07-21-2009 09:23 AM
тАО07-21-2009 09:23 AM
Thanks
Mike
Solved! Go to Solution.
- Tags:
- ETXTBSY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2009 09:35 AM
тАО07-21-2009 09:35 AM
SolutionYou must rename (the shell's 'mv') the file. The 'mv' must be done within the same filesystem so that it does become a copy ('cp').
On the "bad" server:
# mv /usr/lib/libc.1 /usr/lib/libc.1.old
Having copied a good version from a good server as "*.new":
# cp -p /usr/lib/libc.1.new /usr/lib/libc.1
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2009 09:54 AM
тАО07-21-2009 09:54 AM
Re: copy lib text file busy
Thanks
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2009 10:03 AM
тАО07-21-2009 10:03 AM
Re: copy lib text file busy
> in case if that libc doesnt work i should be able to move that .old again - correct?
Yes.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2009 01:15 AM
тАО07-22-2009 01:15 AM
Re: copy lib text file busy
>JRF: You must rename (the shell's 'mv')
The proper command for fiddling with text busy files is the atomic "ln -f", not mv.
# cp -p .../libc.1.new /usr/lib/libc.1.new
# ln -f /usr/lib/libc.1 /usr/lib/libc.1.old
# ln -f /usr/lib/libc.1.new /usr/lib/libc.1
By using ln vs mv, the gap where there isn't a libc.1, is greatly reduced.
>in case if that libc doesn't work I should be able to move that .old again - correct?
No, you need that atomic "ln -f" again:
# ln -f /usr/lib/libc.1.old /usr/lib/libc.1
If you mess this up, plan B is to use /sbin/ln. And if that's messed up, plan C is /sbin/link & /sbin/unlink.