Questions tagged [copying]

This tag refers to the process of making an exact duplicate of a file, database, etc.

Use this tag for questions related to copying files, databases, etc. on a system.

374 questions
565
votes
13 answers

How do I copy the contents of one stream to another?

What is the best way to copy the contents of one stream to another? Is there a standard utility method for this?
Anton
  • 6,860
  • 12
  • 30
  • 26
218
votes
3 answers

How to copy files across computers using SSH and MAC OS X Terminal

I'm trying to copy my .profile, .rvm and .ssh folders/files to a new computer and keep getting a "not a regular file" response. I know how to use the cp and ssh commands but I'm not sure how to use them in order to transfer files from one computer…
alvincrespo
  • 9,224
  • 13
  • 46
  • 60
90
votes
12 answers

Progress during large file copy (Copy-Item & Write-Progress?)

Is there any way to copy a really large file (from one server to another) in PowerShell AND display its progress? There are solutions out there to use Write-Progress in conjunction with looping to copy many files and display progress. However I…
Jason Jarrett
  • 3,857
  • 1
  • 27
  • 28
86
votes
6 answers

How to Copy from IPython session without terminal prompts

Frequently, my workflow involves data cleaning/munging in an IPython shell. This has become particularly wonderful since IPython version 5.0 with all the great upgrades to the terminal interface. So, let's say I make an attempt at sprucing up some…
juanpa.arrivillaga
  • 88,713
  • 10
  • 131
  • 172
48
votes
10 answers

How to copy a huge table data into another table in SQL Server

I have a table with 3.4 million rows. I want to copy this whole data into another table. I am performing this task using the below query: select * into new_items from productDB.dbo.items I need to know the best possible way to do this task.
sqlchild
  • 8,754
  • 28
  • 105
  • 167
38
votes
7 answers

In what cases should I use memcpy over standard operators in C++?

When can I get better performance using memcpy or how do I benefit from using it? For example: float a[3]; float b[3]; is code: memcpy(a, b, 3*sizeof(float)); faster than this one? a[0] = b[0]; a[1] = b[1]; a[2] = b[2];
Pythagoras of Samos
  • 3,051
  • 5
  • 29
  • 51
37
votes
5 answers

putting a remote file into hadoop without copying it to local disk

I am writing a shell script to put data into hadoop as soon as they are generated. I can ssh to my master node, copy the files to a folder over there and then put them into hadoop. I am looking for a shell command to get rid of copying the file to…
reza
  • 1,188
  • 3
  • 17
  • 32
31
votes
4 answers

Copy folders from one directory to another in R

I have two folders (say "A","B") which are in a folder (say "Input"). I want to copy "A" and "B" to another folder (say "Output"). Can I do this in R?
Karan Pappala
  • 581
  • 2
  • 6
  • 18
26
votes
7 answers

getting list without k'th element efficiently and non-destructively

I have a list in python and I'd like to iterate through it, and selectively construct a list that contains all the elements except the current k'th element. one way I can do it is this: l = [('a', 1), ('b', 2), ('c', 3)] for num, elt in…
user248237
24
votes
2 answers

SQL Server: Copying column within table

What is the easiest way to copy the all the values from a column in a table to another column in the same table?
Hoopy Frood
  • 343
  • 1
  • 3
  • 5
19
votes
1 answer

How to copy a file using Paperclip

Does anyone know of a way to copy files with Paperclip using S3 for storage? Before I try to write my own, I just wanted to make sure there wasn't already a way to do this. Thanks
CalebHC
  • 4,998
  • 3
  • 36
  • 42
19
votes
5 answers

prevent accidental object copying in C++

In our company's coding standard, we have been told to "be aware of the ways (accidental) copying can be prevented". I am not really sure what this means, but assume that they mean we should stop classes from being copied if this is not…
Andy
  • 2,770
  • 9
  • 35
  • 42
18
votes
1 answer

Vim enters into visual mode on selecting text after El Capitan update

Issue is what the title says. Earlier I used to copy text from text files open in vim simply by selecting text and doing Ctrl + C. But now it puts me into visual mode, thus not allowing to copy the text. Its really annoying. Anybody knows any fix…
pratpor
  • 1,954
  • 1
  • 27
  • 46
17
votes
4 answers

Overwrite file in copying IF content to of them not the same

I have a lot of files from one side (A) and a lot of other files in other place (B) I'm copying A to B, there are a lot of files are the same, but content could be different! Usually I used mc (Midnight Commander) to do it, and selected "Overwrite…
user1016265
  • 2,307
  • 3
  • 32
  • 49
17
votes
1 answer

R: How can a function accept variable arguments using ellipsis (...) without copying them in memory?

[EDIT: The issue prompting this workaround has been fixed since R 3.1.0.] I was asked elsewhere to post this as a self-answered question. When an R function accepts an arbitrary number of parameters through the ellipsis arguments, the common way to…
codeola
  • 838
  • 6
  • 14
1
2 3
24 25