I run a command in a Linux terminal, the result was written to the desied folder. After I modified the command and rerun it. The old files are still there and not overwritten at all. Only it is successfull after I deleted the old files and run the command.
I try to write to a file "date > file" but Linux says 'cannot overwrite existing file'. I tried chmod 755 but still cannot write to the file. What should I do?
I've used gconf-editor to disable the "show_desktop" feature of Nautilus to get multiple wallpapers to work, but now want my icons back. But I can't:
Code:
warnec@lucidL:~$ LANG=C sudo gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop 'true' Error setting value: Can't overwrite existing read-only value: Value for `/apps/nautilus/preferences/show_desktop' set in a read-only source at the front of your configuration path
It does neither work with gconf-editor. It says this key is "protected from writing"
I have reinstalled XP and conseqently messed up Grub and lost Ubuntu. I am trying to do a fresh install but the installer insists on trying to overwrite the whole disk. I downloaded the alternate instal ISO as this has got over this problem in the past but this also wanted to overwrite the whole disk. It recognises the Sata Raid array as being nfts (this is my main data disk) but it doesn't recognise the existing partitions on my main disk:
I use software where I have to edit a text file in order to get my custom needs from it. Problem is that when the author puts out an update, it always overwrites my changes and I have to spend hours trying to compare the file, re-edit my changes back in, etc. This happens sometimes as often as once per month.
I've wondered if there might be a linux tool or commands which would look through the new file, then at my old file, changing only the text which already exists while not breaking anything else. Most software authors seem to know how to do this but since mine doesn't, how can I accomplish this on my own?
currently there's a xxx dir already in /home/yyy I'm trying to overwrite itcp -fr ../xxx /home/yyy/doesn't work still prompts me to overwrite the individual files. how do I fix it?
I'm using CentOS 5.5 with smbclient 3.0.33-3.28-el5 (latest version in repo), and I can't overwrite files in my Samba store. I am not the admin for the Windows server that hosts the share, so there isn't anything I can do server side. But I do have write permission to the server. I know the server runs Windows XP or Server 2003; I don't know which. I can delete the file, and then copy the new version over, but I can't overwrite it. Using the cp command I'll get this error:
[jonescb@localhost ~]$ cp foo.txt /mnt/si_storage/foo.txt cp: cannot create regular file `/mnt/si_storage/foo.txt': No such file or directory`
And if I edit a file on the server using vim, I can save it once, but if I save it again I get this: "/mnt/si_storage/foo.txt" E212: Can't open file for writing This is my /etc/fstab entry for the samba server: //192.168.1.2/SI_STORAGE /mnt/si_storage cifs username=myuser,password=mypass 0 0 I can overwrite files just fine on my XP machine. The CentOS box is the only one having problems.
I'm using CentOS 5.5 with smbclient 3.0.33-3.28-el5 (latest version in repo), and I can't overwrite files in my smb store.The CentOS box is merely a client of the smb share,and I am not the admin for the Windows server that hosts the share, so there isn't anything I can do server side. But I do have write permission to the server. I'm 95% certain that the server runs Windows Server 2003.I can create a new file,but if I need to overwrite it I need to delete the file, and then copy the new version over.My Windows XP machine can overwrite files perfectly fine.
Using the cp command I'll get this error: (/mnt/storage/foo.txt already exists) [jonescb@localhost ~]$ cp foo.txt /mnt/storage/foo.txt cp: cannot create regular file `/mnt/storage/foo.txt': No such file or directory`
I need to overwrite the first say 50 or so lines of an xml file on an everyday basis. The first 50 lines of the file are always the same and the 50 lines they get replaced with are always the same. Is there a way to create a file with the 50 new lines and somehow copy/merge/overwrite the larger file such that the 50 original lines would be replaced but the remainder of the file would be untouched?This seems simple, there has to be a way to do it. I'm just not smart enough to figure it out.
How to use cp command without to overwrite target file permissionsFor examplecp /tmp/file /home/fileI dont want to change chown and chgrp on /home/file
I have a Debian OS installed (6.0), installed on a single partition, which was running out of space. So I copied all the data in /home to a spare partition, then edited fstab to mount this new partition as /home.
This works fine. But now of course I have the /home data both on the new partition (the one that is now being mounted and used), and also still on the original partition, though this directory is no longer mounted by the OS, so I can't directly 'get at' the data to delete it.
I could easily get into the partition from another OS and delete the unneeded /home data of course but I was just wondering; as this data is no longer 'seen' by the OS, will it be overwritten automatically by the OS when it needs more space, as it does with data that has been deleted from the filesystem, or would it be reserved somehow, still using up space?
I am facing a problem. I want to know how to add files to an already existing rpm. Not at the creation time of rpm. Because we have to add some files to it dynamically if any user purchases it from our webserver. I have searched everywhere but havent find any. Is it possible to do so?
I have a list of files that I am copying around for various purposes. What my current command looks similar to this:cat list_of_files | xargs -I {} /bin/cp -f {} /destination/dirI am using the full path to cp so that the default alias of cp -i does not take effect. However, when I find a duplicate file, it is overwriting any that have already been copied. What I would like to do is to force cp to not overwrite and not prompt.
I am trying to make a floppy image with a working file system so that I can test a 2 stage boot loader. When I attempt to mount the floppy and then cp the second binary over to it, mount gets all unhappy. Here are the steps I am trying to use:
I have problem with bootloader , mean to say , after installing fedora 13 my windows 7 bootloader will overwrite, and when i install windows7 boot loader my fedora 13 bootloader will overwrite vice versa
For example I want a file to be processed by sed, and then overwrite the file with sed's output. I would try this: Code: sed '<regex goes here>' myfile > myfile But it doesn't work as expected, instead it empties the file (I am thinking that as the first byte comes out of sed, it overwrites the whole file and sed has nothing more to do). How can I make this work?
I am writing a shell script that unzips a ZIP file into an existing hierarchy of files, potentially overwriting some of the files. The problem is that the unzip command asks for confirmation: replace jsp/extension/add-aspect.jsp? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
This is unacceptable for a script.I need an option to force unzip to overwrite the files.I did not find in the man page nor with Google.
I have a Pentium 4 HP laptop with Linux only OS, Xubuntu 10.04 LTS
I hadn't powered this one up in a long time and when I did, of course, the Update Manager informed me there were a LOT of updates (around 400 files) and of course I said OK.
It never quite completes, giving me an error message. Apparently two different packages are trying to over write each other's data.
The two packages that fail to update are
kdelib5-data and gnome-settings-daemon
and I really don't know what to do about it.
although isn't kde one desktop environment and gnome another? And Xfce yet a third?
I have a really nuisance problem. I have two NAS servers - different makes - both of which work perfectly under Windows XP. I can write new files, save existing files without error. Both servers have drives formatted to FAT32 - the only option - although the OS's are almost certainly an embedded Linux.Both units are recognized by Ubuntu 10.04 - and I can write new files to them both without problem (although the directory does not refresh - I have to reload it). I can also delete without problems. If I try and save over an existing file I get an error "Unexpected error: Invalid argument" - I presume the implied delete is failing but am not sure. New files also seem to be saved with the Read Only flag set.OK - I can work round the problem by deleting the files (that works OK) and saving them anew. Works fine - but a backup is impossible as any changed file will give rise to the error.I have tucked both drives into the hosts files in /etc - although I attach by IP address (which is fixed) anyway.
I'm trying to copy some files via terminal because i had some issues with nautilus crashing in the middle of the operation. So how can i copy files recursively while skipping existing ones?
Since Ubuntu is smaller than Windows, will it entirely delete Windows to install Ubuntu? The Ubuntu installation won't affect the recovery drive, right?
Will unzipping always append files if the directories already exist? What about tar?
I unzipped an archive the archive had 3 folders and dozens of subfolders within those. app, skin, js
The folder I unzipped it to also already had those 3 folders as well as many child folders etc.
My website is still working so I'm just wondering. Is this safe or is there anything I should worry about. The other option was to manually upload each file manually that is in those 3 folders and the dozens of sub folders.
I have an existing unix user that some how didnt make it into the copy over to our LDAP server. How do I add an existing unix user to an existing LDAP directory? Will ldapadd work? I was under the impression ldapadd required an ldif file to work properly.
I am planning to install 10.4 when it arrives. And am not going to upgrade because i upgraded from 9.04 to 9.10 so now i need to refresh the system.But I have all my partitions except root using lvm2 logical volumes. My question is : What is the safest procedure to install 10.4 on an existing lvm2 without losing my files/partitions
I seem to be unable to install Ubuntu at all (see this).
I was wondering if I can try installing another distro, and once the kernel and basics are up and running "update it" to Ubuntu without reinstalling the kernel and video drivers (once the Nvidia propietary drivers are up and running, all should be ok?
If yes, what would be the best distro to install and use as a launchpad to install Ubuntu?
Asuming I have two files, one large file and one small file, I want to write the smaller file to the large file without overwriting the remaining part of the larger file.
Both are binary files, and the large file can become very large, so I want to avoid copying the whole file, as that will take some time. Is there any standard Linux console utility to do this, or do I need to write it myself?