Programming :: Script To Copy Files From One Host To A Group?
Mar 31, 2011
I have one script that goes through some IPs:
###############################3
#/usr/bin/sh
# This is a script to copy files from one host to a group of
[code]....
View 6 Replies
ADVERTISEMENT
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
Jul 28, 2010
My RHEL version is Red Hat Enterprise Linux AS release 4(Nanhant update 6) I installed Linux on vmware.My host is win xp.Am able to ping guest as well host.How i can copy the files from host to guest.
View 2 Replies
View Related
Feb 2, 2009
I am looking for an API in JAVA which gives me functionality to copy a file to remote host in secure manner like (SCP).
View 1 Replies
View Related
Oct 19, 2009
i want secondary users can able to change the files permissions of primary group?user MAC is having www as a primary and httpd as secondary group. But he want to change the file permissions (chmod) httpd group files. Is it possible or not? I think its not possible. If it`s possible then let me know how?
View 3 Replies
View Related
May 24, 2010
I have a text file that currently has around 150 000 usernames in it. I need to somehow group them into smaller groups of 1000 and then add that value into the DB. for example user xzy group 1 (hopefully the groups will be digits incrementing)
[Code]....
how to search for 1000 then assign them group 1 and then 1001-1999 to group 2 etc.
View 3 Replies
View Related
Sep 13, 2010
I am trying to copy content of single folder to multiple destination simultaneously using tar and FIFO. here is the source code
mkfifo bin1.fifo
tar -C bin -cf - . | tee bin1.fifo | tar -C bin2 -xf - &
tar -C bin1 -xf bin1.fifo
[code]....
View 1 Replies
View Related
Feb 14, 2011
I have been searching for a solution to the following problem:
When my distro of choice updates Firefox web browser, the directory name is '/usr/lib/firefox-<version>'.
The problem here is that the directory name is dynamic by nature and doesn't allow a simple static solution, e.g.
'cp -rf /usr/local/files/bookmarks.html /usr/lib/firefox/defaults/profile'.
The same quandary applies when adding extensions, changing prefs etc.
I have looked at the following commands:-
find, sed, xargs, grep, awk, fprint.
Unfortunately my grasp of syntax and programming is very simple at best.
View 2 Replies
View Related
Jul 13, 2011
I have a lot of filenames (strings) following the same convention
m02_+1+7_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg
[code].....
What I want to do is to create a script that will interpret the following string and save into variables part of its name
m02_+1+7_London_0000$01.cfg as
------X-Y--City---------
X=1
Y=7
City=London
[code]....
then I want to copy the files that go all the files with the same City and X and Y to the same subfolder City/MX.Y I will need some help start doing that. And I think the first would be to get part of the filenames strings into variables.
View 3 Replies
View Related
Jan 4, 2010
I am trying to make small kernel. I have written many programs and produce many .bin and .o files but what I want that to load every file from a specific location in specific sectors but don't know how to do that in linux , in dos same can be done by debug command.If It is not possible to achieve the specific location criterion please tell me how can I just copy many files serially to a floppy image.I have another question that if files are copied in floppy. How could I know in which sector the file has been loaded in floppy so that I can retrieve them by BIOS interrupt INT13.
View 7 Replies
View Related
Aug 25, 2010
I've been trying to sort this out for several hours and I?m totally lost? I?ve been searching around, but haven?t found the solution to my problem. I have a directory with 100 files. I need to copy 10 lines of each files (let?s say from line 45 to 55) into one unique file. So I guess I could use sed ?w, but I didn?t manage to write the right script. I also tried using a loop to create 100 different files, each one with the 10 lines) to concatenate them later on. But I only got 1 file, not 100.
View 12 Replies
View Related
Aug 11, 2010
I need to copy files from dir1 to dir2 on the linux file system - but I only want to copy those files that were not already copied. This needs to be done in C++. Any suggestions?
View 14 Replies
View Related
Mar 29, 2010
I have to copy some log files with a cron job; I'd like to copy only the newer files added because I run the script with a weekly cron. all the log files are named like "10-03-29.CVS" and reside in a dir. When I copy I'd like to copy only the files not already copied with the last cron job.
View 8 Replies
View Related
Mar 25, 2010
write shell script for copy files to usbdąsk that cosist of very long argument like "2009025_efkl".
View 1 Replies
View Related
Jul 28, 2010
Here is what I currently do and want to automate:
1) I manually enter a particular web site address in the browser.
2) When the page displays on my machine, it shows a number of links I need to visit, one after the other.
3) Each of these links display another page (file) from which I "cut and paste" information. I do this by highlighting manually the wanted info, click "copy" then select an open file on my computer, select "undo" if necessary to remove any previous content, click "paste" and then "save".
4) I then call a Yabasic program that reads the saved file and trims unwanted info.
5) At the completion of the Yabasic program, I click the web page tag, click the "back" button to return to the first page (since I am in the second) and click the next link in this first page till all links have been visited.
6) visit the next known web site and repeat 1 to 5
In an automated program, what I need to do is:
1) Visit the known page of the web site showing the links
2) save the page showing the links (the first page)
3) make a list of those links
4) visit each link one after the other and save its page from which I will programmatically (Yabasic) select info.
5) repeat 1 to 4
I can do this in "Yabasic" (which can issue Linux commands) or PHP although I do not know PHP much.the purpose of this is to associate towns and cities of the world with their respective political/geographical divisions and their respective time zone. This has to be done often because that data changes regularly.
View 3 Replies
View Related
Dec 29, 2010
Originally Posted by Kenny_StrawnPlease wrap [CODE] tags aroung any code posted here. The full source that way could still be posted.I am trying to copy all the files in the directory based on the modification date (i.e created on Dec 29). Not able to find the proper command for this. This is what I have tried.
(none) login: root
#
# cd /mnt/hd/
[code]...
View 8 Replies
View Related
Nov 2, 2010
I have encountered a problem:I have "while" loop; at each run a set of outputs is produced but then I need to shift them into a corresponding folder ; otherwise next run the new outputs will be over-written. Furthermore, I need to pipe what I have on the screen inside a file. I have put my code in the following:
Code:
# !/bin/bash
jf="GeoQuery.jar"
[code]...
View 3 Replies
View Related
Feb 13, 2011
I have made a shell script to copy and delete files through FTP.I want to first delete all txt files and then mput all txt files.
Code:
ftp ()
{
[code]....
View 6 Replies
View Related
Feb 15, 2010
We are using Nagios Server for different sites say India,US,Germany. All of them are in their respective groups. Now how do i create web access to 3 of them, so that they can monitor only their server? Say, India shouls be able to see and monitor only India group, US guys should able to monitor only US servers. And they not be anle to access other group.
View 1 Replies
View Related
Apr 20, 2010
I've got quite a decent rsync script setup, however I'd like to invoke it whenever there's change to a file. My initial idea was to use find, however this has two major flaws - the first being my particular unix veriant cant understand -print0 which means this doesn't work, the second is that I'm not 100% sure how to put variables into quotation marks so ls can understand the target:
Code:
for i in `find /shares/ -mtime -1 -print`; do ls -ltr $i;done
View 14 Replies
View Related
Mar 4, 2010
I am working on a cluster for a molecular dynamics class and I have to edit my FORTRAN code (only the newest and best for me!). In order to get through to the cluster I have to ssh in. The network on which the cluster resides is behind a firewall, so I have to ssh through the firewall into the network first.
this is fine, I can login and move files and folders as needed, including sftp-ing into host 1, then into the cluster so I can transfer files from cluster to host and then host to me. This gets rather tiresome, so it would be nice to edit the files in place.
The problem is that when I access my code with emacs it launches the emacs client on Host 1, with no mouse support. I know the purists will howl about how I should be using keyboard shortcuts, but I am a chemist and not a programmer, so the mouse is very nice for me. Is there any way I can perhaps mount the cluster using sshfs so that when I open my code it launches a local instance of emacs? Sorry if this is the wrong forum, but I thought it was network related.
View 3 Replies
View Related
Oct 20, 2010
I have two servers, one has an empty / and the other has a subdirectory with a large number (4 gig) with many, many files. I need a way to transfer the files en masse from the server with the large number of files to the one that is essentially blank.I don't have space on the used host to simply gzip all the files. I've googled this and see that there may be some combination of tar and/or gzip that will let me do this with some sort of redirection.
I really need and example line of how this can be accomplished. If my explanation seems rather sparse, I can supply more details.
View 3 Replies
View Related
Mar 20, 2010
what are the series of files that are called when a user make copy operation from usb mass storage to hard disk?i have reached the code of the usb mass storage in linux kernel 2.6.33 and i want the exact code the make the copy how can i do that?
View 2 Replies
View Related
Sep 12, 2010
I'm looking for a way to copy and archive 10 years worth of message history from a Yahoo Group. With some changes in the yahoo group format coming in the future my group has concerns. I can copy a page at a time but it is not practical. how to go about it. I'm nearly clueless and am told that it can't be done.
View 9 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
Jan 3, 2009
After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).
View 4 Replies
View Related
Oct 2, 2010
How do I setup a host computer to accept display from laptops in a group of laptops?
I have a group of people each set to manage a specific task. I have a projector in the middle of the room hooked up to a computer. How can each user push their screens to the host computer? All computers are on a lan
View 3 Replies
View Related
Feb 10, 2010
I have Ubuntu Server 9.10 setup on virtualbox and i'm using webmin and everthing works so far. But now i'd like to install Coldfusion 9, so how do i download or copy across from my Host OS ? Is there a very lightweight gui i could install, although prefer to stay away from that if i can ?
View 2 Replies
View Related
May 9, 2010
Have just installed ubuntu on virual disk. So now, as host machine I have - Windows, and as guest machine - Ubuntu. Such question, how to copy/paste texts between host and guest machines (into command-line, mc, etc.)? ps: I have tried ctrl+v and ctrl+shift+v (ctrl, shift - left buttons), no reaction at all.
View 5 Replies
View Related