General :: Why 'cannot Overwrite Existing File'
Mar 8, 2011I 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?
View 2 RepliesI 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?
View 2 RepliesI 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.
View 3 Replies View RelatedI'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:
18G windows
18G Old Ubuntu
113G nfts data disk
i want to know why do we need to patch files based upon diff when we can directly overwrite the old file with the new file.
View 4 Replies View RelatedAsuming 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?
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?
We have some large files with sampling data in it. Don't want to delete these files. But want to quickly overwrite the file with 0s and/or 1s and preserve the original file size.
View 3 Replies View RelatedHow to create a dump of an existing file and how to restore it with command line?
View 6 Replies View RelatedIs there a way to edit an existing nautilus (fie manager) bookmark?
Invoke from Linux command line:
$ nautilus
Activate connection editor: File>Connect To Server...>
Complete entries in the pop up:
Service Type: [WebDAV (HTTP)]
Server: [localhost]
Port: [8001]
Folder [webdav]
[Code]....
Code:
dd bs=8192 if=Image of=/dev/PS0
In the above command, I cant able to understand the option "of=/dev/PS0"
Whether it means,
1) to write the input file "Image" in to "/dev/PS0" of the Floppy device
or
2) to overwrite the same input file "Image" in a file format ("/dev/PS0") of Floppy.
I had a drive that kept kernel panic'ing so my data center recommended using the spare hard drive to reinstall OS on, and import the data from the old drive. (they checked the hardware, it wasn't the hardware) The new install is done, and I need to mount the old drive and get backups off it since my data center does not provide management whatsoever.
It's the same OS on both (Cent OS 5.4 32-bit) I'm an advanced user on windows, but linux gets me. I can ssh in, do basic stuff like setup IP ranges and restart services. I normally navigate the box through SFTP so I have a gui. WHM shows me my drives as such
Found Disk: hda
Found Disk: sdb
so I'm assuming SDB is my old drive and the drive I need to access. I attempted to follow instructions on
cyberciti.biz/faq/freebsd-adding-second-hard-disk-howto/
but I'm assuming FreeBSD would work differently and I wasn't totally sure what the labels of the file systems should be.
I'm getting some funny behavior from ffmpeg when I'm trying to increase the volume of an mp3 file and have it overwrite itself. For example, if I execute the following command:
Code:
ffmpeg -i name.mp3 -vol 1024 -y name.mp3
it will code the first 5 seconds or so and then quit with:
Code:
[mp3 @ 0x2db16d0]incomplete frame
Error while decoding stream #0.0
[Code]....
I have written a spec file for packaging my application in an rpm, but it reports a conflict when I am trying to update my service script in /etc/init.d/. This is a file that I do need to update/replace so how might I force the rpm to do that?
Code:
Summary: A program that increases WAN performance.
Name: packetsqueezer
Version: 0.3.05
Release: 1
[code]...
I've recently left Windows behind for good and have come to Linux (Ubuntu.) However, I've run into problems after trying to dual boot windows 7 and ubuntu. When I restarted my computer, I got a black screen with white text reading "Minimal BASH-like line editing is supported". I have the Ubuntu live cd and was able to try Ubuntu without having to install it, but after I put in a flash drive with Windows 7 on it, the Ubuntu CD has stopped working entirely.
The weird thing is, the computer that I installed Ubuntu on, already had Ubuntu and Windows 7 on it. And every OS was booting successfully. The reason I deleted the Ubuntu that was already on the computer, is because there were many different versions. I wanted to do a clean sweep and only have Ubuntu and Windows 7 installed on the computer. I know that if you try to dual boot Windows 7 and Ubuntu, Windows will overwrite the GRUB file, making it unable to dual boot.
My situation:
Host A: need sudo to access the file
Host B: need sudo to access/overwrite the target file
How to copy a file from host A to host B without creating temporaries? Is it possible?
since arch has started using python3, bleachbit is broken, so i am looking for a system cleaner to replace it. i need something that will overwrite file contents and clear firefox cache + the all the normal functions of a system cleaner.
View 8 Replies View Relatedi want to move the text of a file to another file,using sed command. how can i do it?
View 1 Replies View RelatedI have two files list1.cfg and list2.cfg both files contains differentrecords details like
List1.cfg
NAME1:25:C:NAME LINE1:
NAME2:25:C:NAME LINE2:
CITY:25:C:City:
[code]....
Now I want to append contents list2.cfg to list1.cfg(It ispposible using cat list2.cfg >>list1.cfg) but I want to check if content of (record) in list2.cfg is present in list1.cfg then dont append it otherwise append it.
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
View 2 Replies View Relatedthere's a command to overwrite a directory.
View 6 Replies View RelatedI 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 m Trying to get vsftpd usergroups to work i accidentally moved a file called passwd from /etc/vsftpd/ to /etc/, resulting in my root access is destroyed! how to restore the passwd file so i can keep working, or do i have to re-install the entire box?
View 4 Replies View RelatedI created a Symbolic link for ifstate from /etc/network/run to /var/run (/var/run is mounted as tmpfs) and I can write to and from the file perfectly fine, but when trying to start the network I get "Failed to overwrite statefile Read only file-system". I double checked permissions to see if that was the problem, but it does not appear to be
View 5 Replies View RelatedI 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.
View 2 Replies View RelatedI 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:
dd if=/dev/zero of=floppy.img bs=512 count=2948
mkfs.vfat floppy.img
dd if=boot1.bin of=floppy.img bs=512 count=1
[Code]....
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
View 7 Replies View RelatedI 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?
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?