- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: busy 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
08-29-2007 05:58 PM
08-29-2007 05:58 PM
busy file
hi,
I AM trying to copy the file to another destination it is showing busy.so can i
use #fuser -ku
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2007 06:53 PM
08-29-2007 06:53 PM
Re: busy file
There is no need to use a fuser/lsof hammer. Just use ln -f and teach that guy a lesson: ;-)
cp path/file file.new
ln file file.old
ln -f file.new file
rm file.new
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2007 06:59 PM
08-29-2007 06:59 PM
Re: busy file
"mv targetfile targetfile.old"
followed by a
"cp sourcefile targetfile"
should work. The targetfile is opened by it's inode, and by moving the file, the inode remains untouched, just the name is changed. The current user will keep using the old file until he closes and reopens it. New users wil use the new file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2007 07:51 PM
08-29-2007 07:51 PM
Re: busy file
Hi,
A busy file on UNIX is one which cannot be unlinked (unlink(2)), not necessarily any open file as reported by fuser(1M). Busy and open being synonymous is the case with Windows.
When a file is overwritten, its inode (the pointer to the data, named by the file's name) is unlinked from the data. If a process has the data open, then that data will continue to use disk space until the process exits. But since the inode could be unlinked from the old data, the file name is free to be used for a new inode pointing to the restored data.
Had the unlink(2) failed, common with shared library files, then the inode would be renamed to #
WK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2007 08:27 PM
08-29-2007 08:27 PM
Re: busy file
This won't work in all cases. I.e. replacing dld.
Only ln(1) works, so don't settle for cheap imitations. ;-)
>WK: Had the unlink(2) failed, common with shared library files, then the inode would be renamed to #
This "#" convention is a manual process, which must be programmed into the script.