Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'd like to just blast a tar archive's files down onto a (RHEL 3 update 8) machine and ignore all "text file busy" errors that would prevent writing a file. How can I do that, please?
I'd like to just blast a tar archive's files down onto a (RHEL 3 update 8) machine and ignore all "text file busy" errors that would prevent writing a file. How can I do that, please?
The easiest method is boot into single user mode or alternate shutdown pretty much everything so the files aren't in use.
The alternative is extract it elsewhere and then mv -f or rsync it into place... but that's delving into scary territory. You might want to make sure your basic tools are statically linked before doing that.
The easiest method is boot into single user mode or alternate shutdown pretty much everything so the files aren't in use.
The alternative is extract it elsewhere and then mv -f or rsync it into place... but that's delving into scary territory. You might want to make sure your basic tools are statically linked before doing that.
Thanks very much for the rapid reply!
I've already tried bringing the machine down into single-user mode: no joy.
I have no need whatever for the files that currently exist on the target machine, so it's not really all that scary. I need to somehow get tar to simply extract ALL the files. Is there any way to avoid those "text file busy" errors and just write, regardless?
Which files are causing a problem?
If(!) they are still in use in single user mode, makes them pretty vital...
You could try using a rescue mode CD/DVD, that way (almost?) no files on the hdd are open when you mount it.
Which files are causing a problem?
If(!) they are still in use in single user mode, makes them pretty vital...
You could try using a rescue mode CD/DVD, that way (almost?) no files on the hdd are open when you mount it.
Thanks for the input!
But I have *absolutely* no need to preserve the files that are currently on the target machine. And the target box has no CD/DVD drive, so I'm getting my tar archives there via ftp.
The simplest solution would be to force tar to over-write ALL the files and ignore the "text file busy" errors. Is there no way to do this?
Well, that was a bad idea. Using the "--unlink-first" switch of tar only got me into more trouble when it ran into a place with softlinks pointing at real files that were busy, for example, in the "/lib/tls" directory. Dropping the files into a temporary area and using a forced move ("mv -f") failed, too.
Is there no-one out there in Linuxquestionsland who knows how I can simply over-write every single file on a machine with files from a tar archive?
Well, that was a bad idea. Using the "--unlink-first" switch of tar only got me into more trouble when it ran into a place with softlinks pointing at real files that were busy, for example, in the "/lib/tls" directory. Dropping the files into a temporary area and using a forced move ("mv -f") failed, too.
Is there no-one out there in Linuxquestionsland who knows how I can simply over-write every single file on a machine with files from a tar archive?
I've never done it with tar (forced overwrite) but if a mv -f fails... you've got something else going on you need to look into.
I doubt this will work if mv -f didn't but try untaring them somewhere else and rsyncing them over the current system.
You still haven't told us which files these are. Just because you don't think you need to worry, doesn't mean the system agrees.
If they're busy, it means they are open and being used. You need to shutdown the relevant process first, then untar.
Thanks once more for the input, but I really do not care at all about the files that are on the machine currently. As I said at the top, all I want to do is "...blast a tar archive's files down onto a machine..."
I've rsync'd over live machines in the past... you just need to exclude certain 'special' items, like /dev, /proc, etc. You can't do a force overwrite on some locations.
If mv -f is failing, please tell us what file you're attempting to overwrite that is failing and we might be able to tell you why, at this point we can't help you any further without additional information.
I'm going to try a different approach (in a new thread) to my basic problem, which is installing a new O/S and applications on a machine that has no CD/DVD or floppy and cannot boot from USB.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.