General :: Copy 3 Dir's Contents To 1 Dir By Crontab?

Jun 7, 2010

how to copy 3 dir's content to 1 dir by crontab?suppose i want to copy /home/ftp1/* /home/ftp2/* /home/ftp3/* to /ftpdatathree ftp user data to one folder after every one minute by crontab methodso it goes like*/1 * * * * /bin/cp -rf ??? /ftpdata

View 14 Replies


ADVERTISEMENT

General :: Copy Contents Of One Directory Into Another

Jul 7, 2011

I would like to copy the contents of a directory into another. I don't want to copy the directory and all files and directories under it, but just the contents of the directory just as if it were a regular file. Doing cp -r target dest copies the directory and the entire hierarchy rooted in it. I get error if I do not include the -r option. (I am calling cp from within a C program.)

View 3 Replies View Related

General :: Copy A Directory Without It's Contents?

Nov 5, 2009

Is there a way to copy a directory (retaining the permissions and owners) without copying the contents of the directory?

If there is no such thing... then I need a way to determine if a target path is a file or a directory, and if it is a directory I need to make a new directory elsewhere that has the same name, owner and permissions.

Basically, I'm trying write a script to copy 200 GB of files over a network to a new server, and I'd like to do it by generating a list with the find command. That way, I can migrate large chunks of the files over the course of a week, and on the day of the migration generate a new list of files that changed in the last week and then copy just the chagned files over minimizing the down time. However, the list will contain directories that I can't just use the 'cp' command on because it will copy all the contents of the directory.

View 5 Replies View Related

General :: Copy Entire Folder Contents To Another Using PUTTY?

May 2, 2011

How to Copy the entire folder contents (including sub-folders and their contents) to another folder using PUTTY? Is there any command for that?

View 3 Replies View Related

General :: Copy Contents Of Home Directory To Other Users?

May 3, 2011

I've created other users in my machine. now I want to add all my home directory contents and settings to the home directory of other users. how can i do that? Can I do it from /etc/skel directory?

View 1 Replies View Related

General :: Crontab Not Working \ Edited Crontab File Using Crontab -e?

Apr 27, 2010

I am using Linux 64 bit Redhat Linux. I am trying to setup simple crontab as follow...1. Edited crontab file using crontab -e2. Listed the file once to verify it using crontab -l. This will display as.. 18 5 * * 2-3 ksh $HOME/testScript.sh > $HOME/testscript.out3. Logged in a root and restarted cron deamon using "/etc/init.d/crond restart"As per my understanding now my testScript should start running at 5:18 am Thuesday

View 3 Replies View Related

General :: Copy The Contents Of A Txt File To Other Txt Files (with Similar Names) By Cp Command?

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

General :: BASH Script To Copy Contents Of Directory So Long As Average System Load Low?

May 26, 2010

For reasons I won't get into, I need to copy directories so long as the average system load is low. Can someone help me write a BASH script that will copy the contents of a directory, but check to make sure the average system load is below X before copying each file, and if not, wait Y seconds and try again?

View 3 Replies View Related

General :: Copy Folder Hierarchy / Recreate All Folders From One Directory Without Copying Over Contents Of Folder?

Jul 2, 2010

Is there a way to recreate all the folders from one directory to another without copying over the contents of the folder? I've been trying to do something like this,

Code:for i in `ls $X`; do mkdir $PATH/$i; doneUnfortunately $i is deliminated by whitespaces in the filenames and not the actual folders.

$X contains only other folders so I dont have to worry about regular files but any kind of more "advanced" solution would work.

View 1 Replies View Related

General :: Possible Disabling Crontab Job Without Deleting Crontab Description Entry

Jun 23, 2011

is it possible disabling a crontab job without deleting the crontab description entry (by crontab -e)?I could also accept to change the entry itself. Now it's:0 0 * * 0-6 /home/me/cron/script.csh

View 4 Replies View Related

Software :: Copy A Directory Without Contents

Apr 28, 2009

Is there a way to copy a directory without copying the contents, but preserving ownership, timestamp etc of that directory?

I've looked at the cp man page, but I don't think it supports it. I'm thinking one would have to write a script to gather the info, and then mkdir, chown and touch. Does this seam right?

View 2 Replies View Related

Software :: Copy The Contents Of One Directory To Another?

Mar 10, 2010

I am trying to copy the contents of one directory to another

rsync -av /old /new

when I do this /old is being copied into new

/new/old/files from old

but what I want is the files from old to be moved to new

/new/files from old

how can I do this?

View 2 Replies View Related

CentOS 5 :: Using Mouse & Vim To Copy Contents Of One File Onto Another

Aug 4, 2010

I am using CentOS 5.5 and openSUSE 11.0. I use vim editor but do not know more than 1 - 2% of its functionality. In openSUSE if i open 2 text files in 2 separate terminals, i can copy the contents of one file onto another by just left-clicking and dragging the mouse over the required text. But i am unable to do this in CentOS.

View 6 Replies View Related

Fedora :: Input/output Error When Trying To Copy DVD Contents With DD

Mar 3, 2010

I even threw some video DVDs at it to make sure it wasn't the disc.

Code:

[pickens@acer1 Videos]$ dd if=/dev/sr0 of=POTC.iso
dd: reading `/dev/sr0': Input/output error
5088+0 records in

[code]....

I am getting the same thing on my laptop running Mandriva, oddly enough. Two different drives, two different computers, two different distros and multiple DVDs.

View 9 Replies View Related

Ubuntu :: Partition The New Drive & Just Copy The Contents Using Rsync?

Jan 26, 2011

I just installed a new HD on my system with multiple HD's already. I have a drive with two versions of Ubuntu & would like to copy the complete drive to the new drive along with all the contents & partitions of the Ubuntu drive.

1 - Could I partition the new drive & just copy the contents using rsync?

2 -If I copy all the contents over could I just reinstall Grub & edit fstab & be good to go?

View 3 Replies View Related

Ubuntu Installation :: Does Grub Make Copy Of Contents Of MBR?

Feb 26, 2011

My system is an Acer Aspire One Happy netbook. It runs Windows 7 OEM. I installed Ubuntu Netbook Remix, which works fine. Unfortunately, I put GRUB in the MBR (I wanted it on Ubuntu partition in order to use Win 7 bootloader). Acer netbooks seem to have a particular MBR (in order to run e-Recovery Management), which is different to the standard Windows 7 MBR.

Moreover, in the internet there are instruction to restore Acer MBR, but they do not seem useful, since I do not find the MBRWRWIN.EXE and RTMBR.BIN files on the hidden partition. Is there a way to tell GRUB to remove itself and restore the previous content of the MBR (something like the old "lilo -u")? Does GRUB make a copy of the content of the MBR before installing itself? Where is it, if it is so?

View 2 Replies View Related

Server :: Possible To Copy Directory Contents For Data Transfer

May 2, 2010

I have a server that I wanted to transfer it to a newer one both of them have CentOS but the newer one kernel is more up to date I wanted to know is it possible just to copy some directory contents exactly to another for transferring the server data (for example /var /usr /bin /home /etc). I have one website on my server with its mysql database

View 4 Replies View Related

Ubuntu :: Create Shell Script To Copy Contents Of A Shared Folder On A XP PC?

Apr 8, 2011

I was wondering if there would be a way for me to copy the contents of a shared folder that's running on an XP system using shell script. Actually, there are two shared folders that I want to do this with. I want to be able to launch the script and automatically copy all the contents of each folder into two separate folders on my ubuntu desktop. For example;

Lets say that I have Shared Folders A1 and A2 on my networked XP system and I have Folders B1 and B2 on my Ubuntu desktop. I want the script to automatically copy the contents of A1 into B1 and likewise for A2 and B2. During the copying, I want the script set up such that any pre-existing files in the B1 & B2 folders will automatically get overwritten by the ones copied from A1 & A2.Is there any possibilities of me achieving this?

View 7 Replies View Related

Applications :: Scp Copy A Directory And Its Contents From A Remote Machine To Local Host

Oct 8, 2010

For the life of me I can not figure out what I am doing wrong with scp to copy a directory and its contents from a remote machine to my local host. I have no issues with getting a single file but would like to just save time and get the whole folder in one command.

Here is what I have tried:

scp user AT remoteMachine:/home/username/folderIwant user AT localMachine:/folderIwant this gives me a permission denied error and try again and received disconnect from localHost to many authentication failures

scp user AT remoteMachine:home/username/folderIwant . says can not find file or folder

I am sure this is something easy that I cant remember, and searches gives me local to remote not remote to local and trying to make the local to remote suggestions I read to work remote to local have not worked.

View 2 Replies View Related

Software :: Good Hex Editor - Allow To View Contents Directly And Copy And Paste Stuff

Dec 17, 2010

I'm trying to view directly a partition with a damaged filesystem on it (NTFS) and so far the hex editors I tried do not do that. I tried GHex for example and it complained that /dev/sda is not a file. The partition is unmountable as NTFS however since it is damaged so I couldn't mount it first. Are there any hex editors out there that would allow me to view the contents directly and copy and paste stuff in there?

View 14 Replies View Related

OpenSUSE :: Copy The Contents From /usr/lib64/browser-plugins To The Plugins Folder?

Jul 9, 2010

Download firefox 4 from Index of /pub/mozilla.org/firefox/nightly/latest-trunk Unpack with ark to your home directry folder firefoxIn the folder firefox creat a new folder pluginscopy the contents from /usr/lib64/browser-plugins to the plugins folderStart firefox and there you go

View 9 Replies View Related

OpenSUSE Install :: Install New Fonts - Copy Over The Contents Of The Cd Into The Folder?

Dec 2, 2010

I have a cd of new fonts that I would like to install into the fonts folder.

How do I copy over the contents of the cd into the fonts folder?

I am using 11.3 Gnome 32bit

View 9 Replies View Related

General :: Difference Between /etc/crontab And "crontab -e"

May 29, 2011

What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?

View 2 Replies View Related

Ubuntu :: Copy The Contents Of One Drive To Another New Drive?

Jan 17, 2010

I need to copy the contents of one drive to another new drive.I mean EVERYTHING on it including the OS itself. I am thinking Clonezilla at the moment.

View 9 Replies View Related

Ubuntu :: Cp - Copy Only The Folder Contents To New Folder ?

Feb 21, 2010

I should know this but I figured I'd ask before I screw something up.

What is the command to cp just and only the contents of a folder, not the folder itself, into a new folder?

Code: cp -R /path/to/folder/ /to/new/folder/

Is this right?

View 6 Replies View Related

Ubuntu Servers :: After Using Crontab With /etc/crontab / Giving Error "can't Find Command Root"?

Aug 26, 2010

I have a question about using crontab with /etc/crontab...

I had a cron job that I needed to run as root. At the time I thought that sticking it in /etc/crontab would be a good idea. However, I used the crontab command to edit /etc/crontab, which I guess is not standard procedure? Specifically, I configured /etc/crontab as my local user's crontab (i.e. sudo crontab /etc/crontab) then added my cron job as I would a local user crontab (i.e. sudo crontab -e).

Originally, my cron job looked like this:

30 * * * * root /my/batch/script &> /dev/null

After adding the new cron job I started seeing errors. Something to the effect of "can't find command root" or something similar. So I removed the 'root' user definition from the cron job and the job started running fine. However, because this is /etc/crontab, there are other system related cron jobs that have been defined to run under the root account (e.g. "17 * * * * root cd / && run-parts --report /etc/cron.hourly" runs as root, etc.). So these pre-existing system cron jobs, which up until now have been running smoothly, are now generating "can't find command root" errors. But I think that the system cron jobs _are_ successfully being run someplace because logrotate seems to be working.

So what I _think_ is happening is that /etc/crontab is being run twice: once as the system crontab, and once as my sudoed local user's crontab. When I run crontab -l I see nothing, but when I run sudo crontab -l I can see the contents of /etc/crontab. I am reluctant to delete my sudoed local user's crontab, because then in the process I would be deleting the system crontab, and I do not know how I should restore the system crontab's contents. (I am still not sure as to the most appropriate way to edit the system crontab).

How can I get out of this mess? I want /etc/crontab to go back to the way it was before--running _once_ as the system crontab. As for my new cron job, I'm willing to reconfigure it anywhere so long as I am still able to run it as root. Any ideas? (I am using Ubuntu 8.04 Server LTE)

View 2 Replies View Related

Software :: Scheduling Backup In Crontab When Put This File In Crontab To Schedule The Backup Program It Wont Run?

Apr 9, 2011

I have installed an application manager(monitoring application) on my linux server. Now, i need to have backup schedule for my application. The application itself has executive file to backup database.But when i put this file in my crontab to schedule the backup program it wont run!50 09 * * * root /opt/ME/AppManager9/bin/BackupMysqlDB.sh

View 1 Replies View Related

General :: Copy A Read-Only File And Make The Copy Writable With A Single Cp Command?

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

Fedora :: Write A Crontab Entry Using "crontab -e"

Jul 21, 2011

I was trying to write a crontab entry using "crontab -e"


Code:
0 0 * * * cp /var/log/httpd/domains/mydomain.net.log
/home/admin/logs/mydomain.net.log

crontab is giving me this error:

Code:
"/tmp/crontab.XXXXfMOnRS":2: bad minute
errors in crontab file, can't install.

I've tried a dozen different values for the minute, but it's still giving me the same error.

View 5 Replies View Related

General :: Crontab Can't Run / Why Is So?

Feb 1, 2010

I want to run a crontab job but it isnt working. I am writing in the crontab file with crontab -e Then I am waiting time but it isnt working. code...

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved