[Solved] cp - If file exist, don't copy that file

Is there a way i can copy with cp that if a file exists, it won't even copy that file.
Last edited by haxit (2009-01-08 23:30:48)

I assume you've already done man cp -- if the answer's not there, it may end up being a little more complex, like writing a little shell script or something.
You might try cp -i, which runs it interactively. So you get "cp: overwrite `<file>'?" for every file that's already in the target directory, but depending on how many files you have, that could get cumbersome.
EDIT: Wow, there were a ton of responses while I was typing this.
Last edited by weasel8 (2009-01-08 23:04:13)

Similar Messages

  • Files don't copy correctly from one computer to another

    When I try to copy a file from my MacBook Pro to my I Mac, using Finder,  it always asks for a password (my other computers don't do that) and it only copies an empty file

    Actually, all files. Pictures, data files of all types, .pdf files, all of them.
    I just set up a new I Mac, migrated all my files, apps and data to it from my MacBook Pro Retina, and use both computers for accounting work, so I need to copy files back and forth. I have a folder on both called Files and I keep all my data files in that folder and copy it back and forth. I can copy from the IMac to the MacBook Pro, no request for a password, etc, but when I try to copy anything from the MacBook Pro to the I Mac, it requests a password and it only copies a shell of a file with -0- bytes of content, in other words, name only. Sure would appreciate any suggestions or help.
    Thanks

  • Copy and pasting a page in an existing document? Copy and paste functions are greyed out? Also tried extracting the page to copy but am alerted that an incorrect structure was found in the PDF file?

    copy and pasting a page in an existing document? Copy and paste functions are greyed out? Also tried extracting the page to copy but am alerted that an incorrect structure was found in the PDF file?

    What do you mean by "copy and paste a page"? What tool have you selected? Or are you just assuming you can select stuff and copy/paste as in Word?

  • HT4489 I'm a novice so be nice. I have a list of contacts exported to a .abbu file which I'd like on my iCloud contacts but whenever i try to import them, they don't copy across only into "all contacts"

    I'm a novice so be nice. I have a list of contacts exported to a .abbu file which I'd like on my iCloud contacts but whenever i try to import them, they don't copy across only into "all contacts"
    Can anyone help, any would be appreciated.

    You have exported as an Address Book archive file: you need to select all the contacts and choose to export them as a vCard - this is the only format you can import into the iCloud website.

  • [Solved] Midnight Commander file associations - ePub

    After I installed Midnight Commander, it would open epub files with ebook-viewer (Calibre viewer) out of the box, without any specific config from me, which was great, since that was exactly what I wanted it to do.
    Since right now, it no longer does that, and open the files with Firefox instead (which prompts me to save them somewhere.)
    I did not install any update between yesterday and right now, so I wonder what could have happened. I actually restarted Firefox just before that because it froze, and the version 32 was recently shipped, so that might count as an update.
    I have the default Midnight Commander settings, and from what I understand it's supposed to use lucidor to open epub files, which I don't have (that's in /usr/lib/mc/ext.d/doc.sh lines 177-178.)
    So my question is, where this association, previously with Calibre, now with Firefox, comes from?
    I understand that I could just edit ~/.config/mc/mc.ext to have the proper association, but if I could avoid changing the default settings, I would prefer so.
    Last edited by bonob (2014-09-11 18:35:43)

    Thanks to your pointing at xdg, I understand what's happening. Poor Firefox or xdg associations are actually innocent, what happens is that after I close this particular book (which I just started to read before the problem happened) in Calibre, the mimetype changes, from application/epub+zip to application/zip (Calibre saves the file on exit, because it puts a bookmark at the current location.)
    I don't know how to repair the mimetype, but I have a copy of the original file, so that's fine. I'll try to find more details and report to the Calibre developer, and mark this thread solved.
    Thanks again!

  • TS2472 I don't have that file in my launchdaemons folder....any other ideas?

    I don't have that file in my launchdaemons folder....any other ideas?

    I´ve got the same problem since upgrading to OS 10.7
    Could you solve yours meanwhile?

  • [SOLVED] Tint2 config files not matching

    Hello, I just switched to Arch after using Ubuntu for a long time. I've decided to go the openbox route, and I am trying to using tint2 as my taskbar. I'm currently trying to customize it, but none of the files I download look the same when i load them. This is the screenshot of the config I got on the internet:
    http://fc02.deviantart.net/fs70/i/2012/ … 518z6e.png
    and here is how it is displayed on my computer:
    http://farm9.staticflickr.com/8187/8101 … b2f0_b.jpg
    Can someone please explain what I'm doing wrong, and how I can get it to look the same?
    Note:
    Here's the link to the download page:
    http://dinozaur1982.deviantart.com/art/ … -304429334
    -- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --
    Last edited by xtjacob (2012-10-26 20:51:09)

    Trilby wrote:
    I'm with WonderfulWoofy, they look the same to me.  You just have a different background color and icons.  If you aren't doing so already, you will need to use a compositor (eg xcompmgr) to have the transparency work.
    edit: I stand corrected.  DSpider is right about pseudo transparency.  You may, however, want to compare the two transparency modes.  Personally I've never been able to stomach some of the side effects of pseudo-transparency - but this is certainly just personal taste.
    I'm currently using compton as my compositor and transparency seems to work, so it is probably my desktop...
    DSpider wrote:http://ompldr.org does it automatically. Personally, I use GIMP to resize them to 250 px wide (because I don't like that website doing it for me), save it as a copy, upload both pictures to http://imgur.com and use both [ url ] and [ img ] tags. I'm thinking of writing a script and use a daemon that listens for the PrintScreen key presses to trigger it. But that's another story, for a different topic.
    Alright, thanks for the help. I'll use it next time.

  • I can't seem to get my iMac (late 2009 model) into automatic sleep mode.  If I manually put it into sleep I don't have any issues.  I used to solve the issue by running "PleaseSleep" application but that doesn't work anymore since Lion.

    I can't seem to get my iMac (late 2009 model) into automatic sleep mode.  If I manually put it into sleep I don't have any issues.
    I used to solve the issue by running "PleaseSleep" application but that doesn't work anymore since Lion. I now want to fix the underlying problem.
    I'm not running any weird background processes and in my energy saver settings I've tagged "put the hard disk to sleep when possible:, "allow power button to put computer to sleep" and "automatically reduce brigthness". All pretty standard.
    Is there anyone who can give me some pointers ?

    Today I solved the same problem for my iMac running Snow Leopard. See https://discussions.apple.com/thread/3008791#15947706. The method may help you, too.
    For me it was the DynDNS Updater preventing my iMac from automatically entering sleep mode.
    To my knowledge the cause of this sleep problem can only be a peripheral device or a process. So I suggest to first unplug all peripherals and test whether that's the cause. If not, I suggest to terminate one process after another and to test automatic entering of sleep mode after each. Start with user processes; continue with system process if necessary.
    At least that's the way I found the offending process. Fortunately, I was able to change the configuration of that process to allow again automatic entering of sleep mode.
    Good luck!

  • When i m in a call i touch the screen with my cheek and i keep on putting calls on hols or speaker..how do i solve this?if i don t want a headset?when i m in a call i touch the screen with my cheek and i keep on putting calls on hols or speaker..how do i

    when i m in a call i touch the screen with my cheek and i keep on putting calls on hols or speaker..how do i solve this?if i don t want a headset?

    SORRY, the picture is just to illustrate and to better show the area where the time display is located, same place in the iPhone 3gs, to my knowledge, the location is the same, due to the OS on both phones.
    Second, run the test to see if it works:
    1st test: go to phone mode, select dial key pad, put the tip of your thumb in top of the time display ( the screen will not go black), try to dial.
    2nd test: place a call, after starts ringing switch the display to dial pad, put the tip of your thumb on top of the time display, the screen will not go black, try to dial.
    THE SCREEN WILL ONLY GO BLACK ( INACTIVE) IF YOU TOUCH A LARGER AREA TO THE TOP OF THE DISPLAY, IF THE THUMB ONLY TOUCHES THE TIME DISPLAY AND A LITTLE PART OF THE AREA WHERE THE NUMBERS APPEAR THE DIAL PAD DID NOT WORK EVEN WITH THE DISPLAY NOT GOING BLACK (INACTIVE).
    I am also trying in my wife's iPhone 4 as I right this post and both phones behave the same way.
    I found out what I stated above after running tests to see if the case was affecting the phones performance.
    Due to the thickness of the case on the sensor area, it really did affect the way the sensor was supposed to work, after I cut that part on the case, the sensor started to work perfectly and the screen turns off during a call like it is supposed to do.
    So before someone go nuts thinking that the phone is not working and that they have to take it to repair, try seeing if the case is not interfering with the phones performance.

  • Ibase component don't copy from RfC to change document

    Hi, experts!
    I copied standard roles for ChaRM.
    When Change manager release for development RfC, proper ibase component don’t copy to change document.
    It occurs if I use copied roles.
    I don't see miss authorization in ST01.
    Have you any idea why it happens?
    Thanks,
    Yuliya

    Hi Jansi!
    Thank you for advice.
    I checked settings which described in the blog. It is correct.
    I made customizing for copy control.
    I have this issue only if use role for change manager. If I do these steps with full authorizations ibase
    component copy without any problem. Unfortunately I can’t find miss authorizations.
    Yuliya

  • I've updated my phone and I've made a backup. but now it says I must enter my code to restore all my files and I haven't got this code. If I cancel the process or choose something else, all my stuff will be deleted, and I really don't want that.

    I've updated my phone and I've made a backup. but now it says I must enter my code to restore all my files and I haven't got this code. If I cancel the process or choose something else, all my stuff will be deleted, and I really don't want that.
    HELP ME PLEASE!!!

    If, for some reason, your backup got encrypted and you don't know the code, you'll have to set up your phone as new device and start all over again without the backup.
    Warning: If you encrypt an iPhone backup in iTunes and then forget your password, you will not be able to restore from backup and your data will be unrecoverable. If you forget the password, you can continue to back up and use the device, however you will not be able to restore the encrypted backup to any device without the password. You do not need to enter the password for your backup each time you back up or sync.
    If you cannot remember the password and want to start again, you must perform a full software restore and when iTunes prompts you to select the backup from which to restore, choose set up as a new device.
    If you can't get pass the lock screen, connect in recovery mode and restore the phone, you'll have the option to reset the lock secreen passcode.
    iOS: Unable to update or restore and iPhone and iPod touch: Wrong passcode results in red disabled screen
    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.

  • If I upgrade my iMac with Snow Leopard with a different copy that I had previously used, does It allow me to restore my files from backups?

    I have lost my copy of Snow Leopard and can't upgrade. All my backups were performed with that copy that I don't have anymore. The thing is that I had to reformat my iMac restoring to its factory settings and reinstalling Tiger all over again and then Leopard. I have already ordered another copy of Snow Leopard. My question is: By installing a different copy of Snow Leopard on my computer can I still recovering my backups from Time Machine that I had previously done with that other copy of Snow Leopard that I have lost? I hope I am making sense here and that someone could answer this.

    By installing a different copy of Snow Leopard on my computer can I still recovering my backups from Time Machine that I had previously done with that other copy of Snow Leopard that I have lost?
    Yes. Backups are tied to the computer, not the instaler DVD. Please visit Pondini's Time Machine FAQ for help with all things Time Machine.

  • What can be done to ensure that the Arabic text normally copied from Word to InDesign?

    What can be done to ensure that the Arabic text normally copied from Word to InDesign?
    At Word - normal Arabic text.
    At Indesign - wrong.

    See copy/pasted hebrew text is backwards and/or search the forum for "Arabic" (it has been asked numerous times before).

  • Why do I get a copy of sent mail in my inbox?  I don't want that.

    Why do I get a copy of sent mail in my inbox?  I don't want that.

    You will have to contact Yahoo support. I can not help you here.
    https://io.help.yahoo.com/contact/index?page=contact&locale=en_US&y=PROD_MAIL_ML
    Sounds to me like you are CC yourself, check your preferences.

  • [SOLVED] Systemd service files: sourcing other service files?

    Is there a way to "source" one systemd service file from another, so that the service inherits all settings from the other file? The purpose would be to override or append select fields as a quasi-patch of the other file, e.g.
    <source foo.service>
    [section]
    key=new_value
    I was sure that I had seen this somewhere, but I can't find it. Did I make this up, or is my search-fu simply weak?

    I don't know that it is actually documented at this point in time.  At least I haven't seen any.  The only reason I know about it is beacuse I subscribe to [systemd-devel].  But it was briefly touched on in the announcement when it was first introduced. 
    I know that the .include method is documented very briefly in one of the man pages, but it doesn't really go into depth about how to use it.  I do seem to recall a nice write up about it on Lennart's blog though.  But it seems as though the intent of the systemd.unit.d (what they are calling "drop-in" modifications/replacements) is intended to replace the .include way.  Though I am basing that statement off of the general attitude toward each on the mailing list, and I have seen no official word on this.
    The nice thing about using .include is that you can use systemd-delta to see the changes made using that method.  And while the systemd.unit.d changes are noted in that output, it is nothing more than simply indicating that there has been modification.  The .include stuff actually has a full "diff -u" style output.

Maybe you are looking for

  • I Cannot Add Buddies in iChat 4 and 5 - How do I fix this ?

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as

  • Net down, can't login to router, lights normal on 2nd pc (1st works fine)

    I have had a PC installed with FIOS and working perfectly (wire connection, windows xp, m1424-wr router).  I have brought in a newer upgrade PC tower (vista 64 home) that has had internet working fine just recently, but cannot get it to work with FIO

  • The search feature in Add Places cannot find any locations.

    When I try to add places, the search feature cannot find any locations. I can, however, drag and drop photos onto locations on the map. I've tried contacted support twice and they have not been helpful at all. I would appreciate any help.

  • Problem in installing certificate

    I tired to install trial certificate from verisign. I followed the instruction as in the admin guide First installed the certificate in server cert tab under manage certificate then installed in CA cert tab to make the certificate trust. It went well

  • Mandatory for Visable field but not for hidden field

    Hi All, I have a couple of radio buttons (Yes and No) when the user selects Yes they are then prompted for the date this happend. How can i make the Date field mandatory if they select yes but not if they select no. I have tried making the date field