General :: Cp + Not Want To Overwrite Permissions?

May 26, 2011

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


ADVERTISEMENT

General :: Why 'cannot Overwrite Existing File'

Mar 8, 2011

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?

View 2 Replies View Related

General :: Command To Overwrite A Directory?

Jan 18, 2010

there's a command to overwrite a directory.

View 6 Replies View Related

General :: Cannot Overwrite The Existing Files

Apr 15, 2011

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.

View 3 Replies View Related

General :: OS Overwrite Unmounted Data?

Feb 22, 2011

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?

View 6 Replies View Related

General :: Make `cp` Choose No When Prompted To Overwrite?

Jun 17, 2011

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.

View 2 Replies View Related

General :: Make A Floppy Image And Overwrite The MBR?

Aug 15, 2011

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:

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]....

View 2 Replies View Related

General :: Bootloader Will Overwrite - Fedora 13 With Windows 7

Aug 24, 2010

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 Related

General :: Prevent Author New Files Overwrite Changes

Jun 29, 2011

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?

View 7 Replies View Related

General :: Command To Overwrite File With Sed Output?

Jan 5, 2010

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?

View 14 Replies View Related

General :: RW Permissions On External HDD - Chmod: Changing Permissions Of `whatever': Read-only Filesystem

Mar 15, 2010

I have a problem with my external hdd, I mounted it manually and in the mount table it says ive got rw permissions. But when i try to change permissions it says:

chmod: changing permissions of `whatever': read-only filesystem.

This is my mount table:

[root@localhost ExtHDD]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)

[code]....

View 6 Replies View Related

General :: Unzip Command: Option To Force Overwrite?

Jan 26, 2010

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.

View 1 Replies View Related

General :: Update Error: Two Updates Want To Overwrite Each Others Data?

Apr 23, 2011

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?

View 1 Replies View Related

General :: Doesn't Work Still Prompts To Overwrite The Individual Files

May 5, 2010

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?

View 4 Replies View Related

General :: Windows - Linux: Can't Overwrite Files On Samba Store

Jun 10, 2010

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.

View 1 Replies View Related

General :: Overwrite Windows On Current Drive - But Not The Recovery Partion

Aug 6, 2011

Since Ubuntu is smaller than Windows, will it entirely delete Windows to install Ubuntu? The Ubuntu installation won't affect the recovery drive, right?

View 10 Replies View Related

General :: Change Folder Permissions Without Changing The Permissions Of The Files Within The Folder?

Aug 11, 2010

How do I change folder permissions without changing the permissions of the files within the folder?

View 6 Replies View Related

General :: Why Use Patch Files Based Upon Different When Can Directly Overwrite The Old File With The New File

May 29, 2010

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 Related

General :: Suppress "Do You Want To Overwrite" Prompt While Using Cp Command?

Feb 27, 2010

How to suppress "Do you want to overwrite" prompt while using cp command. I tried "cp -fr", but it isn't worked

View 4 Replies View Related

General :: Install One Distro And Then "overwrite" It With Ubuntu

Feb 24, 2011

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?

View 9 Replies View Related

General :: Overwrite The Header Of A File Without Copying The Whole File?

Mar 1, 2011

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?

View 2 Replies View Related

Debian :: Check That A Deb Will Not Overwrite Anything?

Feb 25, 2011

I have this deb from a package in unstable...

It calls for libhdf5-openmpi, which is not compatible with libhdf5-serial which in turn is used by several packages that i have installed...

It's either the serial or the openmpi version... not both.

Since this specific package from sid calls for this dependence, which way do i have to check that if i override dependency checking it wont overwrite anything along the way...?

All other dependencies can be met... except this particular one...

And i wont be using the functionality that calls for openmpi...

View 7 Replies View Related

Ubuntu :: Change Permissions For File / Add These Lines Without Changing Permissions?

Oct 16, 2010

Finally I managed to install my printer/scanner drivers.The last thing I need to do is to add the following two lines to 40-libsane.rules (which is a read only file):# Brother scanners ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes".How can I change permissions for this file or add these lines without changing permissions?

View 2 Replies View Related

Ubuntu :: Permissions For Rsync And BackinTime - Setup 2nd HD With Correct Permissions?

May 31, 2011

Problem: permissions for rsync and BackinTime. Setup: Ubuntu 11.04, Two internal HD, #1=main, single boot, #2=backup drive. Question: How do I set up my 2nd HD with correct permissions? Background: I had previously a dual boot XP+10.04 with a 2nd HD formatted as NTFS. With this I was able to use my rsync and backintime to my 2nd HD with no issue. My new set up is EXT4 on both HD.

(I even tried to reformat my 2nd HD as NTFS, but that didnt fix the issue) I followed [URL] to mount the 2nd HD and get permissions. But now when I run backintime i get this error: [E] Error: rsync: opendir "/home/myhome/.ssh" failed: Permission denied (13) I did my requisite reading for a newbie, and am stuck. I ran backintime as root, and it backed up ok. How do I run my user version of backintime? (i.e. How do I fix the permission issue?)

View 9 Replies View Related

Fedora :: Command For Overwrite Menu.lst?

Mar 6, 2011

I've modified by mistake my menu.lst file. Both menu.lst and grub.conf are empty. how to fix this? Is there any command to quickly rewrite those files?

View 2 Replies View Related

Ubuntu :: Secure Overwrite Of A Partition?

Jul 9, 2011

i have a duel boot of windows and ubuntu, but recently i got a virus, but this things is leach like in appearance. I tried reinstalling windows, then reformatting the drive and reinstalling windows but i still have this same virus? This is dead creepy for me because windows cant read any of the other partitions, which are all formatted for linux, in formats which windows does not have the capability to read. So i dont understand how this could have happened. There are many things that i am still to try -- including completely overwriting the MBR with a GRUB in case the virus somehow resides in there?? But i have decided to give up on windows from now, because, despite all the actions i have taken, it has failed me repeatedly. But having had these viruses 3 times, i have noticed something, the first time i had a virus was my fault, because i left my computer insecure.

After i formatted my HDD following that virus, i noticed i had 10gb of space robbed from me, disk utility believed i had a 160gb drive, but Gparted and everything else told me that i only had 149.7gb of space??? now after this virus - which logically couldn't have happened without someone directly attempting to tunnel my computer as i had so much extra security - i lost 6gb of space from my HDD?? Sounds odd?

THE QUERY: So i want to know if (from ubuntu) it is possible to do a secure format (similar to with a mac - were it completely overwrites everything, instead of just deleting the links) although, possibly i am not going back to windows, ever.

View 9 Replies View Related

Ubuntu :: Why Does Aptitude Overwrite /etc/sudoers

Jul 23, 2011

I've been trying for a long while to figure out why aptitude overwrites /etc/sudoers ? Each time I run

$ sudo aptitude safe-upgrade

my /etc/sudoers is reset. This is really annoying because I have it setup so that mythtv can shutdown and restart automatically. The line in /etc/sudoers that gets deleted is:

%mythtv ALL = NOPASSWD: /usr/bin/mythshutdown, /bin/sh, /usr/bin/setwakeup.sh, /
sbin/reboot, /sbin/shutdown

When the line is missing my Ubuntu 10.04 does not shut down at all because of missing rights to do so. Does anyone have a clue why this is happening? I thought /etc-files were sacred for others than root, but it seems I'm wrong. Of course I have edited sudoers with visudo.

View 5 Replies View Related

Ubuntu :: Overwrite '/etc/xul-ext/ubufox.js', Which Is Also In Package?

Aug 13, 2011

today when I tried to update my system, this message appeared. Code:E:var/cache/apt/archives/ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb: trying to overwrite '/etc/xul-ext/ubufox.js', which is also in package xul-ext-ubufox 0I can't understand the effect of this on the system or how can I fix it.

View 4 Replies View Related

Programming :: Disk Overwrite Program In C

Feb 17, 2010

I have to shred a disk from a custom program. Now I open the disk (/dev/sdaX) from a C program and write /dev/urandom to it. But, most of the time the disk is being used by other programs. At least a 5-10 programs will have files opened on that disk. I cannot kill all the programs as some of them are critical. (Now, don't ask me why I am trying to overwrite a disk which is live and being used by some critical programs. Some moron designed it that way and gave me to implement). Sooner or later, write to /dev/sdaX will fail.

Is there any way (may be some flags that I can pass to open while opening a disk for writing) that I can use so that my overwrite continues even if other program is using the disk? (I am not bothered about what will the other program read and process from the disk when this happens)

View 6 Replies View Related

CentOS 5 :: Smbclient Can't Overwrite Files?

Jun 17, 2010

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`

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved