General :: Copy Mutiple Files Over Scp In One Command?
Mar 4, 2010
I have to transport a lot of files from one pc to another (both Linux). I would like to use scp for that, but scp only allows for transferring one file at a time. How can I do this?
I have No possibility to use rsync or any other protocol No possibility to use passphrase free certificates (but have a certificate with a passphrase) A list of files to transfer and a list with the destination path of the files on the other server The files are spread out over a lot of directories, and not all the files in the directories I want to copy If possible I would like to gzip and ungzip transparently to save bandwidth!
View 3 Replies
ADVERTISEMENT
Jul 6, 2010
I'm trying to truncate a postfix Maildata directory for one of our users. I want to be able to move any files older than <n> days to a new location, but also copying the relevant directory structure. This should be doable in the one comman. I've used find to locate the files, and mv to move them, but I can't figure out how to build the directoryt structure on the fly in the new location.
This is what I have so far:
Code:
find /Maildata/editor -mtime +42 -type f -exec mv -v {} /EditorEmailOld/ ; > ~/editor.txt
View 4 Replies
View Related
Jul 2, 2010
Code:
cp -r aa123.h aa*.h
results in
Code:
cp: target `aa456.h' is not a directory
Yes I read man page cp (1p). There is something written there about it, I couldn't understand though.
View 7 Replies
View Related
Apr 21, 2010
I'm trying to change a line of a bunch of xml files (more than 800).What I want isto change this line:
Code:
<variable name="reliability" size="1">96</variable>
to
[code]...
View 1 Replies
View Related
Jun 10, 2010
I need to copy all subdirectories and files from one directory to another ever 5 minutes or so, with the old data automatically being overwritten with the new data. I'd also like this to run at startup. Is there any way this can be done? If so, what program would I need to schedule the automation and what is the command line I would need.
View 2 Replies
View Related
Mar 16, 2011
iam trying to send sms using gnokii utility in linux firstly i did sudo apt-get install gnokii after that i got a gnokiirc.gz file in /usr/share/doc/gnokii/sample/gnokiirc.gz file here after that i did gunzip gnokiirc.gz then i transferred my file from the /usr/share/doc/gnokii/sample to home directory by using copy command as copying files to home is not allowed so i used sudo sudo cp gnokii /home after that i changed the port=/dev/ttyUSB2 and model=AT in the gnokiirc file in the home directory and then i wrote gnokii --identify
[Code]....
i followed as in the [URL] and [URL] and except this "Note that you will need read/write permissions on whatever serial port you specify in .gnokiirc."(iam confused what is my serial port is it ttyUSB2)
View 7 Replies
View Related
Feb 20, 2011
Is there a method at the command line to copy files from one location to another and retain the source files group and user?I'm migrating some MySQL files from one machine to another.I want to back-up the original files in the directory presently. They have owner:group of mysql, some have owner:group root:mysql and so on. To copy them under cli or Nautilus everything changes to root for I execute sudo cp or gksudo nautilus and copy via gui.
Since it is MySQL data I could simply do a dump of the database and restore it on the other machine. But there's about 20 db's and I want to do this via a copy for it will be faster - at least that is what I think.
View 5 Replies
View Related
Mar 1, 2011
How to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).
More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.
View 1 Replies
View Related
Apr 11, 2010
how can i copy by script or command files with *.v suffix by "-p" option?
Example:
kuku.ggg
kuku.dd
kuku.v
kuku.vb
only if i try to copy kuku.v by default cp -p will done.
View 7 Replies
View Related
Dec 14, 2010
I'm looking for a way to copy files with a certain file extension over to another folder. For exampleSource Folder: /home/user/downloadsFile Type: *.epubDestination Folder: /home/user/epubs/The downloads folder has several folders that may go as deep as 2 or 3 levels.I tried this but it didn't seem to work (and I'm not really sure what to do to modify it to get it to work).Quote:find . -maxdepth 1 -type f -exec grep -q "pattern" '{}' ';' -exec cp '{}' /path/to/destination
View 4 Replies
View Related
Apr 22, 2010
Is there a simple command to copy files that have been created within the past 2 hours?I've been looking through the man pages for unisonrsyncfindcpand I can't find anything I'm looking for.All I need is a simple command.Code:Copy folder a to b if created < 2 hours.
View 4 Replies
View Related
Feb 17, 2011
install imagemagick python, and pygtk.
Code:
sudo apt-get install imagemagick python pygtk
Now save the following script somewhere as imgclip.py. This is a simple python script which takes an image file and puts it in the gnome-clipboard.
Code:
#! /usr/bin/python
import pygtk
pygtk.require('2.0')
[code]...
View 1 Replies
View Related
Mar 30, 2011
I am experimenting with LUKS+dm_crypt. My setup is something like this: a LVM VG made of multiple Physical Volumes (PV). That VG contains multiple LV (Logical Volumes), most of them encrypted via LUKS+dm_crypt (via cryptsetup).Editing "/etc/crypttab", the system will requiere a passphrase for each encrypted LV. But since all my encrypted LVs share the same passphrase, I would like to be prompted only ONCE, instead of twelve times (I have 12 encrypted LV).
I have thought about writing a script to include in initrd that ask for the password once, store the result somewhere volatile (ramdisk?), and provide that password for the rest of "/etc/crypttab" entries.But this seems complex and fragile.I wonder if there is something I am missing, or some other easier way.
View 2 Replies
View Related
Aug 25, 2009
How can you create a script to move or copy files from a main directory into multiple directories below the main directory.
View 7 Replies
View Related
Feb 1, 2011
When i installed ubuntu. I made a seperate partition so that i could copy an ISO image onto it of an up-to-date version of ubuntu. I wanted to then boot the ISO up so i could install the version that way.I've already tried doing it through the update manager but it'll download, almost be done with installing and it freezes on me. so i figured this would be easier. However i do not know how to gain access to the other partition to copy the ISO image.
View 6 Replies
View Related
Jun 8, 2010
I have many files and folders in my source folder. I want to copy some files and folders from that source folder to destination folder. What should be require to given with the "cp" command?
View 1 Replies
View Related
Jul 25, 2010
For example, if I type ':pwd' to get the current working directory, I can select the text in gvim but I can't figure out how to copy it to the clipboard. If I try the same in console vim, I can't even select it with the mouse. I would like this to work with all vim commands, such as set guifont to copy the guifont=Consolas:h10:cANSI output.
View 4 Replies
View Related
Jul 20, 2010
i use linux ubuntu..i try to copy db and type some mysqldump command..but at terminal show: The program 'mysqldump' can be found in the following packages:
* mysql-client-5.0
* mysql-client-5.1
Try: sudo apt-get install <selected package> bash: mysqldump: command not found
how to get mysqldump for my pc? i've tried to follow the instruction,but show like below:
Err http://ubuntu-ashisuto.ubuntulinux.jp jaunty/main libnet-daemon-perl 0.43-1 Could not connect to ubuntu-ashisuto.ubuntulinux.jp:80 (122.216.218.146), connection timed out
View 3 Replies
View Related
Aug 18, 2010
I would like copy a backup file from image vmware linux to windows but i don't know how to process it ?i tried :scp /source/backup.tar.gz admin@x.x.x.x:/c:ProgrammefilesC:Documentsand SettingsAdminMyDocumentsbut error and i know that it's not like that, so if you have solutions
View 2 Replies
View Related
Jan 20, 2010
Imaging-copying a working remote share on WindowsNT to a local Linux disk target is needed .
Is that possible with dd command(how if remote share is connected as smb://ipnumber/share) and do you need root privilleges on local and remote machine for that?Perhapson source machine:dd if=/dev/hda bs=16065b | netcat targethost-IP 1234on target machine:netcat -l -p 1234of=/dev/hdc bs=16065borrsh 192.168.xx.yy "dd if=/dev/sda ibs=4096 onv=notrunc,noerror" | dd of=/dev/sda obs=4096(any difference to dd/privilleges if you use it as windows dd version since remote is running windowsNT)?
View 1 Replies
View Related
Feb 25, 2010
I want to find files of a particular tyepe and particular date to be copied into a seperate folder.How do i do achieve this in a single line using the find and copy command.
View 8 Replies
View Related
Sep 18, 2010
Tried this, but there's no such a command in Arch.And this also doesn't work:Code:find ~ | grep -i pidgin | xclipboard Error: another clipboard is already running
View 5 Replies
View Related
Sep 1, 2010
I have a 160GB harddrive which I installed a F12, would like to upgrade to a bigger drive, but I hate to have to re-install everything.
Recommend a good disk copy utility? The utility should be able to not only copy files, but boot sector and everything. So I just need to make a copy, change my BIOS to boot from the new drive and run everything as before.
View 11 Replies
View Related
Jul 9, 2010
just installed ubuntu couple of days back on my netbook. I am still a beginner, enjoying my adventure exploring ubuntu. I have another desktop which runs on XP. I am able to access XP shared folders through my netbook(linux). However, i wanted to copy files from XP infact folders using TERMINAL in my netbook, not copy and paste using my mouse. Are there any commands for it?
View 1 Replies
View Related
Dec 5, 2010
I back up all my digital photos to a couple of places. I've been using the cp command, but--given the personal value--have started to wonder if there's a more reliable way. I'm no stranger to Linux, Bash, Perl, etc., so I could write something to copy and compare md5 hashes, but I was wondering if something already exists (reinvention, wheels and what-not).
Most of my googling for copy and (verify|valid|check|hash|confirm) turns up rsync. However, as far as I can tell, rsync only uses hashes to see if a file needs to be updated. It doesn't perform a hash comparison afterward. For this use, specifically, the files are binary and typically 8-10MB.
View 3 Replies
View Related
Jun 24, 2011
I can copy image in Gimp and paste it to OpenOffice document.
How to do it (copy or paste image) from command line?
View 1 Replies
View Related
Jul 28, 2011
Any please help me for incremental copy command similar to windows.commad for copying in windows is c: source xcopy *.* destination /s/c/d/q/yany similar command is there in linux as I m new in Linux
View 4 Replies
View Related
Dec 23, 2010
I am trying to upgrade PHP on our linux box ( CentOS ) I copied the configure command from the phpinfo and now I want to execute that.I am not able to copy the command from an editor in linux to the command prompt, clicking the wheel om my mouse does not work, neither does shift-insert or ctrl-shift-insert.It does work in the editor itself.Is there a way to do this ?Or is there a way to execute the command in linux while it is in the file ? Like a bat file on Windows ?
View 14 Replies
View Related
May 24, 2010
I'm trying to copy some files to a dvd. and i was wondering is the tar command the correct command or is there a better way.
View 1 Replies
View Related
Dec 2, 2010
First I hope to undrestand my English word because Iam Arabic girl and not so good in English...
my problem is:
I wrote code in .c file and I run that code on the prompt command, its ture but I want after the out put copy the code on the command by some statment in the code , how can I do that?
View 3 Replies
View Related