Search Results

Search found 15087 results on 604 pages for 'copy constructor'.

Page 9/604 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Permissions restoring from Time Machine - Finder copy vs "cp" copy

    - by Ben Challenor
    Note: this question was starting to sprawl so I rewrote it. I have a folder that I'm trying to restore from a Time Machine backup. Using cp -R works fine, but certain folders cannot be restored with either the Time Machine UI or Finder. Other users have reported similar errors and the cp -R workaround was suggested (e.g. Restoring from Time Machine - Permissions Error). But I wanted to understand: Why cp -R works when the Finder and the Time Machine UI do not. Whether I could prevent the errors by changing file permissions before the backup. There do indeed seem to be some permissions that Finder works with and some that it does not. I've narrowed the errors down to folders with the user ben (that's me) and the group wheel. Here's a simplified reproduction. I have four folders with the owner/group combinations I've seen so far: ben ~/Desktop/test $ ls -lea total 16 drwxr-xr-x 7 ben staff 238 27 Nov 14:31 . drwx------+ 17 ben staff 578 27 Nov 14:29 .. 0: group:everyone deny delete -rw-r--r--@ 1 ben staff 6148 27 Nov 14:31 .DS_Store drwxr-xr-x 3 ben staff 102 27 Nov 14:30 ben-staff drwxr-xr-x 3 ben wheel 102 27 Nov 14:30 ben-wheel drwxr-xr-x 3 root admin 102 27 Nov 14:31 root-admin drwxr-xr-x 3 root wheel 102 27 Nov 14:31 root-wheel Each contains a single file called file with the same owner/group: ben ~/Desktop/test $ cd ben-staff ben ~/Desktop/test/ben-staff $ ls -lea total 0 drwxr-xr-x 3 ben staff 102 27 Nov 14:30 . drwxr-xr-x 7 ben staff 238 27 Nov 14:31 .. -rw-r--r-- 1 ben staff 0 27 Nov 14:30 file In the backup, they look like this: ben /Volumes/Deimos/Backups.backupdb/Ben’s MacBook Air/Latest/Macintosh HD/Users/ben/Desktop/test $ ls -leA total 16 -rw-r--r--@ 1 ben staff 6148 27 Nov 14:34 .DS_Store 0: group:everyone deny write,delete,append,writeattr,writeextattr,chown drwxr-xr-x@ 3 ben staff 102 27 Nov 14:51 ben-staff 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown drwxr-xr-x@ 3 ben wheel 102 27 Nov 14:51 ben-wheel 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown drwxr-xr-x@ 3 root admin 102 27 Nov 14:52 root-admin 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown drwxr-xr-x@ 3 root wheel 102 27 Nov 14:52 root-wheel 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown Of these, ben-staff can be restored with Finder without errors. root-wheel and root-admin ask for my password and then restore without errors. But ben-wheel does not prompt for my password and gives the error: The operation can’t be completed because you don’t have permission to access “file”. Interestingly, I can restore the file from this folder by dragging it directly to my local drive (instead of dragging its parent folder), but when I do so its permissions are changed to ben/staff. Here are the permissions after the restore for the three folders that worked correctly, and the file from ben-wheel that was changed to ben/staff. ben ~/Desktop/test-restore $ ls -leA total 16 -rw-r--r--@ 1 ben staff 6148 27 Nov 14:46 .DS_Store drwxr-xr-x 3 ben staff 102 27 Nov 14:30 ben-staff -rw-r--r-- 1 ben staff 0 27 Nov 14:30 file drwxr-xr-x 3 root admin 102 27 Nov 14:31 root-admin drwxr-xr-x 3 root wheel 102 27 Nov 14:31 root-wheel Can anyone explain this behaviour? Why do Finder and the Time Machine UI break with the ben / wheel permissions? And why does cp -R work (even without sudo)?

    Read the article

  • How does copy protection work?

    - by Yar
    Many programs refuse to go beyond a trial period. Even if they are trashed and then reinstalled, they 'remember' that the trial period has expired. Assuming no contact with a licensing server, what is the general way that most copy protection works? Do programs drop files in random folders on the hard disk that are hard to track down? I know there's no registry on OSX/Linux, but perhaps something similar... ? Or must it be a file/folder? I'm actually not curious from a hacking side but rather from the implementation side, but in any case the question is basically the same.

    Read the article

  • Remote File Copy - Win Server 2008

    - by Scott
    I'd like to copy backup archives from a remote server to my client machine. In the past, I've installed an FTP server on the remote machine and directed local server backups to dump into that directory. I'd then FTP in from my client machine. Just wondering if there is a simpler way to do this using Win 7 (Client) Win Server 2008? Robocopy? RDC command line options? For example, I can easily remote desktop in and drag the files from the server to my local machine. If there is an easy command line way to do this, then I don't have to setup an FTP server which is ideal. Thanks.

    Read the article

  • auto copy newest folders and images in MyPictures folder to USB drive

    - by TVersmet
    I drop lots of photos in a day into the My Documents/My Pictures folder. I archive at the end of each day to USB drives, to be stored offsite. What I would like is someway to automate the process. By example, a small app or script I can simply double-click and it will scan the My Pictures folder for the newest folders and images and copy them to the USB drive until the drive is full. It doesn't matter if I get redundancy from the previous days saved images, so long as the newest images and folders are always the first to get copied. Well, that's my request. Thanks for reading.

    Read the article

  • MacVim + tmux or: The Copy Paste Riddle

    - by Konzepz
    Now this is weird. Copied a chunk of a text from somewhere into clipboard. Ran mvim from a tmux buffer. Opened a file in MacVim. Pasted the text. MacVim results with the error: E353: Nothing to register + Nothing gets pasted. The plot thickens: I try to copy this error -- paste fails. I go over the same steps, this time running MacVim from a regular Terminal window (without tmux) -- Everything is in its right place. Whaa?

    Read the article

  • Software to copy non-duplicate files from CD/DVD

    - by John22
    I have several CDs/DVDs which have partially overlapping content (the overlapping files are identical, but have different names), and some of the files are on my hard disk. I need to get the remaining unique files copied to my hard disk. I found a really good duplicate file finder, Duplicate Cleaner, which lets you select multiple folders and then finds duplicates by checksum (or file name, size, date) and is very fast, and free. It won't help me do what I want though, unless I just copied everything, and then deleted the duplicates - but I would have to do multiple cycles, as I don't have room to copy all the CDs/DVDs to my hard disk. I found a couple of file sync programs, but they don't have the compare function - the file names must match. (I tried other duplicate file finders on CNET, but they aren't as good as Duplicate Cleaner, and also don't have the functionality I need.) Thanks for any help.

    Read the article

  • Unix copy command that has a progress bar, but not as heavy as rsync

    - by Rory McCann
    I need to copy lots of files. Usually I use rsync because I pass it the -aP options and I can see (a) how many files are left to process and (b) how much of each individual file is copied. However rsync also does lots of things with checksums to verify that a file was copied. However I don't really need that now. But normal cp doesn't include the above mentioned count of files left, which is very helpful. Is there anything like cp that includes progress of how many files left, but isn't as heavy as rsync?

    Read the article

  • How can I copy cells in Excel 2007 and paste with formatting

    - by John
    I am wanting to be able to copy cells in a worksheet and paste them elsewhere in the same worksheet while maintaining the original formatting. I also want to be able to paste into Word and Outlook and keep the same formatting. Everything I have tried discards the the formatting and only pastes unformatted text. Paste Option buttons do not appear even though they have been defined in the setting to appear. Also Format Painter does not seem to do anything at all. Is there a setting that needs to be changed to resolve this?

    Read the article

  • Windows Storage Server 2003: Shadow Copy (VSS) enabled for volume, but Previous Version not visible

    - by Jaap
    Windows Storage Server 2003 We have Shadow Copy (VSS) enabled for one volume. However Previous Version tab is not visible on the server on properties dialogs on any file or folder on that volume. We don't want this tab to be visible on the clients, just on the server. I've checked the VSS settings and they're definitly enabled for the volume. I'm stuck! Do I have to install the client-software on the server? The folder \%systemroot%\system32\clients\twclient contains 3 empty subdirs (location copies from docs)...

    Read the article

  • copy files created in one folder to multiple other folders on linux

    - by Keith
    I'm looking for a way to copy photos that are uploaded to one folder to many other folders and visa versa. Example: a photo is uploaded to folder 1, it is then copied to folders 2-5. And if a photo is uploaded to folder 2 it is copied to folders 1 and 3-5. I'm running CentOS 5. All of these folders are on the same server. I came across another post on here that talked about incron, but that type of programming is over my head.

    Read the article

  • How to copy windows explorer file selections and past filenames as txt

    - by Ricky Williams
    Win7 How can I select multiple files in explorer and get a string of text listing the file names like i would get if i selected the files from within "open file" window of an application. for example if i have a Dir that contains 100 jpegs and i select 01.jpg, 05.jpg, 10.jpg in windows explore via ctrl+clicks or shift+click how can i get a text string that reads " "01.jpg" "05.jpg" "10.jpg" with or without the selected files full path " with out dragging the selected files to another window? I've tried copy and pasting into Note Pad and Word Pad and it either past the picts into the the application or a empty clipboard.

    Read the article

  • How do I copy files in Jolicloud from one drive to another

    - by Jason
    I'm running Jolicloud 1.2 from a USB stick. I clicked the "run but don't install option" at the start up menu and then i created an account. It says I am logged in as guest mode. How can I copy files from my original c:\ which is listed in the file manager to my usb stick. There's no button and drag and drop doesn't work is there a way to get into terminal? Is it perhaps restricted because I am a "guest"?

    Read the article

  • Copy Constructor in C++

    - by user265260
    i have this code #include <iostream> using namespace std; class Test{ public: int a; Test(int i=0):a(i){} ~Test(){ cout << a << endl; } Test(const Test &){ cout << "copy" << endl; } void operator=(const Test &){ cout << "=" << endl; } Test operator+(Test& p){ Test res(a+p.a); return res; } }; int main (int argc, char const *argv[]){ Test t1(10), t2(20); Test t3=t1+t2; return 0; } Output: 30 20 10 Why isnt the copy constructor called here?

    Read the article

  • Samba 3.5 Shadow Copy for Windows 7

    - by Prashanth Sundaram
    Over the past several days I have been trying to get the shadow to work with samba but haven’t been successful. Can someone check below config and let me know if I am missing something? We are using Equallogic SAN and iSCSI LUNS to mount volumes. I can cleanly access samba shares on Windows 7 clients but just not shadow copy. I have referred the official how-to but couldn’t get it to work. I see these messages in the logs. Any help is deeply appreciated. [2012/10/31 12:20:53.549863, 0] smbd/nttrans.c:2170(call_nt_transact_ioctl) FSCTL_GET_SHADOW_COPY_DATA: connectpath /fs/test-01, failed. [2012/10/31 12:21:13.887198, 0] modules/vfs_shadow_copy2.c:734(shadow_copy2_get_shadow_copy2_data) shadow:snapdir not found for /fs/test-01 in get_shadow_copy_data [2012/10/31 12:21:13.887265, 0] smbd/nttrans.c:2170(call_nt_transact_ioctl) FSCTL_GET_SHADOW_COPY_DATA: connectpath /fs/test-01, failed. == Samba pkgs == samba-3.5.10-116.el6_2.x86_64 samba-common-3.5.10-116.el6_2.x86_64 samba-winbind-clients-3.5.10-116.el6_2.x86_64 samba-client-3.5.10-116.el6_2.x86_64 === df –h == First is the iSCSI LUN and 2 others are snapshots. /dev/mapper/eql-0-fs-test01 5.0G 2.3G 2.5G 48% /fs/test-01 /dev/mapper/eql-2-0+fs-test01 5.0G 2.3G 2.5G 48% /fs/test-01/@GMT-2012.10.26-17.32.42/fs/test-01 (SNAPSHOT-1) /dev/mapper/eql-d-0+fs-test01 5.0G 2.3G 2.5G 48% /fs/test-01/@GMT-2012.10.31-11.52.42/fs/test-01 (SNAPSHOT- 2) ===/etc/samba/smb.conf === [global] workgroup = DOMAIN server string = Samba Server Version %v security = ads realm = DOMAIN.CORP encrypt passwords = yes guest account = nobody map to guest = bad uid log file = /var/log/samba/%m.log domain master = no local master = no preferred master = no os level = 0 load printers = no show add printer wizard = no printable = no printcap name = /dev/null disable spoolss = yes follow symlinks = yes wide links = yes unix extensions = no [test] comment = Test Directories path = /fs/test-01 vfs objects = shadow_copy2 #shadow_copy2: sort = desc #shadow: localtime = yes #shadow: snapdir = /fs/test-01/test #shadow: basedir = /fs/test-01 guest ok = yes writeable = yes map archive = no force create mode = 0660 force directory mode = 2770 inherit owner = yes inherit permissions = yes All feedback is welcome. Thanks!

    Read the article

  • Win 7 x64 explorer.exe stops responding on copy/paste

    - by Sourabh
    Few months ago I changed my Win7 orb using this software. But it changed only the explorer.exe in C:\Windows. To solve that, I copied explorer.exe from there to C:\Windows\system32 and C:\Windows\SysWOW64 (Probably a bad idea). Things were working fine until a few days ago, it started giving me problems while copying. Sometimes, when I copy/paste, It works fine but sometimes it stays on that dialog box which looks like it is doing pre-copying things like counting number of files/file size etc. But its not. It stays on that screen forever. Now if I try to close it, title changes to cancelling but rest stays the same. If I try to close it too many times, explorer.exe crashes. And its not related to file-size. It may crash for 4Mb file and work fine for 10Gb file but some other time, it'll do the opposite. Is there any way to reset my explorer.exe and Is this because of explorer.exe or something else PS: I forgot to take backup of explorer.exe. PS2: I didn't install any software or downloaded anything that could harm my computer. EDIT I tried System Restore and SFC /scannow but they didn't help.

    Read the article

  • PST backup with Volume Shadow Copy Service

    - by NoMadMan
    I was asked to implement the task of backing up 35 PST files ranging from 800Mb to 2000Mb. Windows XP and Windows 2000 workstations are assigned to the users and we have a Windows 2000 domain controller we use to back up files on 3x 500Gb external hard drives. I found several methods from applications to scripts. Local or remote applications would be my last resort. I came across this script based on Volume Shadow Copy Service. CopyWithVss I wanted to know if there would be a problem if the path had spaces. Would mounting the destination path of each PST folder with a drive letter be more practical? My concern with mounting option is that i would eventually run out of letters since I have 35 and possibly more workstations to back up. Lastly, can someone give me an example of CopyWithVss if it were run on a production network? The script is a bit cryptic even after reading several times. Where in the script do I enter the source and the destination? I'm a Mac user so please excuse my ignorance with Windows platform.

    Read the article

  • How to befriend a templated class's constructor?

    - by Kyle
    Why does class A; template<typename T> class B { private: A* a; public: B(); }; class A : public B<int> { private: friend B<int>::B<int>(); int x; }; template<typename T> B<T>::B() { a = new A; a->x = 5; } int main() { return 0; } result in ../src/main.cpp:15: error: invalid use of constructor as a template ../src/main.cpp:15: note: use ‘B::B’ instead of ‘B::class B’ to name the constructor in a qualified name yet changing friend B<int>::B<int>() to friend B<int>::B() results in ../src/main.cpp:15: error: no ‘void B::B()’ member function declared in class ‘B’ while removing the template completely class A; class B { private: A* a; public: B(); }; class A : public B { private: friend B::B(); int x; }; B::B() { a = new A; a->x = 5; } int main() { return 0; } compiles and executes just fine -- despite my IDE saying friend B::B() is invalid syntax?

    Read the article

  • Copy object using pointer (templates)

    - by Azodious
    How the push_back of stl::vector is implemented so it can make copy of any datatype .. may be pointer, double pointer and so on ... I'm implementing a template class having a function push_back almost similar to vector. Within this method a copy of argument should be inserted in internal memory allocated memory. but the argument is a pointer. (an object pointer). Can you pls tell how to create copy from pointer. so that if i delete the pointer in caller still the copy exists in my template class? Code base is as follows: template<typename T> class Vector { public: void push_back(const T& val_in) { T* a = *(new T(val_in)); m_pData[SIZE++] = a; } } Caller: Vector<MyClass*> v(3); MyClass* a = new MyClass(); a->a = 0; a->b = .5; v.push_back(a); delete a; Thanks.

    Read the article

  • How to copy a part of a link in google chrome?

    - by Mikhail Morfikov
    Is there a way to copy a part of text of a link which is located on a website in google chrome browser? For instance: If we see a link on a website, and we hover mouse on it, we can click on it, but we can also highlight it if we press left mouse button and drag mouse pointer starting from either the beginning or the end of the link. But what if we have a link -- http://sourceforge.net/ , and we want to copy only the word "forge"? Remember that this is not the same as copying from the address bar in google chrome browser.

    Read the article

  • IOC Container Handling State Params in Non-Default Constructor

    - by Mystagogue
    For the purpose of this discussion, there are two kinds of parameters an object constructor might take: state dependency or service dependency. Supplying a service dependency with an IOC container is easy: DI takes over. But in contrast, state dependencies are usually only known to the client. That is, the object requestor. It turns out that having a client supply the state params through an IOC Container is quite painful. I will show several different ways to do this, all of which have big problems, and ask the community if there is another option I'm missing. Let's begin: Before I added an IOC container to my project code, I started with a class like this: class Foobar { //parameters are state dependencies, not service dependencies public Foobar(string alpha, int omega){...}; //...other stuff } I decide to add a Logger service depdendency to the Foobar class, which perhaps I'll provide through DI: class Foobar { public Foobar(string alpha, int omega, ILogger log){...}; //...other stuff } But then I'm also told I need to make class Foobar itself "swappable." That is, I'm required to service-locate a Foobar instance. I add a new interface into the mix: class Foobar : IFoobar { public Foobar(string alpha, int omega, ILogger log){...}; //...other stuff } When I make the service locator call, it will DI the ILogger service dependency for me. Unfortunately the same is not true of the state dependencies Alpha and Omega. Some containers offer a syntax to address this: //Unity 2.0 pseudo-ish code: myContainer.Resolve<IFoobar>( new parameterOverride[] { {"alpha", "one"}, {"omega",2} } ); I like the feature, but I don't like that it is untyped and not evident to the developer what parameters must be passed (via intellisense, etc). So I look at another solution: //This is a "boiler plate" heavy approach! class Foobar : IFoobar { public Foobar (string alpha, int omega){...}; //...stuff } class FoobarFactory : IFoobarFactory { public IFoobar IFoobarFactory.Create(string alpha, int omega){ return new Foobar(alpha, omega); } } //fetch it... myContainer.Resolve<IFoobarFactory>().Create("one", 2); The above solves the type-safety and intellisense problem, but it (1) forced class Foobar to fetch an ILogger through a service locator rather than DI and (2) it requires me to make a bunch of boiler-plate (XXXFactory, IXXXFactory) for all varieties of Foobar implementations I might use. Should I decide to go with a pure service locator approach, it may not be a problem. But I still can't stand all the boiler-plate needed to make this work. So then I try this: //code named "concrete creator" class Foobar : IFoobar { public Foobar(string alpha, int omega, ILogger log){...}; static IFoobar Create(string alpha, int omega){ //unity 2.0 pseudo-ish code. Assume a common //service locator, or singleton holds the container... return Container.Resolve<IFoobar>( new parameterOverride[] {{"alpha", alpha},{"omega", omega} } ); } //Get my instance: Foobar.Create("alpha",2); I actually don't mind that I'm using the concrete "Foobar" class to create an IFoobar. It represents a base concept that I don't expect to change in my code. I also don't mind the lack of type-safety in the static "Create", because it is now encapsulated. My intellisense is working too! Any concrete instance made this way will ignore the supplied state params if they don't apply (a Unity 2.0 behavior). Perhaps a different concrete implementation "FooFoobar" might have a formal arg name mismatch, but I'm still pretty happy with it. But the big problem with this approach is that it only works effectively with Unity 2.0 (a mismatched parameter in Structure Map will throw an exception). So it is good only if I stay with Unity. The problem is, I'm beginning to like Structure Map a lot more. So now I go onto yet another option: class Foobar : IFoobar, IFoobarInit { public Foobar(ILogger log){...}; public IFoobar IFoobarInit.Initialize(string alpha, int omega){ this.alpha = alpha; this.omega = omega; return this; } } //now create it... IFoobar foo = myContainer.resolve<IFoobarInit>().Initialize("one", 2) Now with this I've got a somewhat nice compromise with the other approaches: (1) My arguments are type-safe / intellisense aware (2) I have a choice of fetching the ILogger via DI (shown above) or service locator, (3) there is no need to make one or more seperate concrete FoobarFactory classes (contrast with the verbose "boiler-plate" example code earlier), and (4) it reasonably upholds the principle "make interfaces easy to use correctly, and hard to use incorrectly." At least it arguably is no worse than the alternatives previously discussed. One acceptance barrier yet remains: I also want to apply "design by contract." Every sample I presented was intentionally favoring constructor injection (for state dependencies) because I want to preserve "invariant" support as most commonly practiced. Namely, the invariant is established when the constructor completes. In the sample above, the invarient is not established when object construction completes. As long as I'm doing home-grown "design by contract" I could just tell developers not to test the invariant until the Initialize(...) method is called. But more to the point, when .net 4.0 comes out I want to use its "code contract" support for design by contract. From what I read, it will not be compatible with this last approach. Curses! Of course it also occurs to me that my entire philosophy is off. Perhaps I'd be told that conjuring a Foobar : IFoobar via a service locator implies that it is a service - and services only have other service dependencies, they don't have state dependencies (such as the Alpha and Omega of these examples). I'm open to listening to such philosophical matters as well, but I'd also like to know what semi-authorative reference to read that would steer me down that thought path. So now I turn it to the community. What approach should I consider that I havn't yet? Must I really believe I've exhausted my options?

    Read the article

  • Is it possible to copy a set of files, but automatically skip if file already exists?

    - by awe
    I know that the copy command has an option to automatically replace a file if it already exists, but I want to know if it is a way to copy the files only if they not already exist (/Y). I do not know the actual file names in the batch code, as I copy from the source using wildcards in the copy command: copy *.zip c:\destination The reason I want this instead of automatic overwrite is that the files are large, and to skip existing would save a lot of execution time.

    Read the article

  • Is it possible to copy a set of files, but automatically skip if file already exists?

    - by awe
    I know that the copy command has an option to automatically replace a file if it already exists, but I want to know if it is a way to copy the files only if they not already exist (/Y). I do not know the actual file names in the batch code, as I copy from the source using wildcards in the copy command: copy *.zip c:\destination The reason I want this instead of automatic overwrite is that the files are large, and to skip existing would save a lot of execution time.

    Read the article

  • WPF DataGrid extended "copy and paste"

    - by MadSeb
    Hi, How can I make the WPF DataGrid have some sort of improved "copy and paste" where I can select a single cell , copy using Ctrl-C , select a bunch of cells of columns and paste using Ctrl-V ??? So for example...in the image bellow ...I want to be able to copy the "Tech" word to all the highlighted cells just by a Ctrl-C on tech, a select of the cells, and a Ctrl-V ... Regards, Seb

    Read the article

  • Copy a file to a new directory path in DOS

    - by nodmonkey
    How can I copy a file using DOS commands into a directory structure that may not yet exist? I need to be able to force the creation of the directory path to the target file location if that location doesn't already exist. For example, there is already a file.txt in this location: C:\file.txt And I want to copy it to C:\example\new\path\to\copy\of\file\file.txt but at this time C:\example\ and all the subdirectories may or may not yet exist. Basically, I am looking for a "copy and create the target path if necessary" command. What would you recommend is the best way to achieve this?

    Read the article

  • files end up in wrong directory after svn copy

    - by Andy
    I want to copy the trunk of one project to another, so I use the following command: svn copy -m "test" (url of project from)/Trunk/ (url of project to)/Trunk/ The files ended up in (url of project to)/Trunk/Trunk/ instead of (url of project to)/Trunk/ where I want them to go. Have I done something wrong? What should I do if I do if I want the files in (url of project to)/Trunk/? Doing the the following does not seem to make sense: svn copy -m "test" (url of project from)/Trunk/ (url of project to)/

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >