Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th November 2006, 22:43
bpmee bpmee is offline
Member
 
Join Date: Aug 2006
Posts: 86
Thanks: 3
Thanked 7 Times in 6 Posts
Unhappy Sudden Problem Started using cp: command "omitting directory"

Hi All,

Thanks in advance to anyone that can help me with this one...

Just today, I'm having problems using the cp: command:

1. Suddenly, -i (interactive) is forced upon me, even if I didn't call for it.

2. If I use " -f ", I get an interactive prompt.

3. I get directory not found, or "directory omitted" for the following commands, that * worked fine * up until today:

Code:
find /var/www/web1*/web/bmres*/myfolder/ -maxdepth 1 -type d | awk '{print "cp -f -R /home/searchfeed.php "$1"/"}' | /bin/sh
makes error

Code:
: No such file or directory: line 12: /bin/sh
OR, if I call it simply from the shell, as in the following:

Code:
cp -f /home/searchfeed.php /var/www/web1*/web/site*/myfolder
makes errors:

Code:
cp: omitting directory `/var/www/web199/web/site_source_aaaadn0/myfolder'
for EVERY web folder and site_source folder within the web1* call!

What's up, these commands worked fine a few days ago!

Reply With Quote
Sponsored Links
  #2  
Old 14th November 2006, 15:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by bpmee
OR, if I call it simply from the shell, as in the following:

Code:
cp -f /home/searchfeed.php /var/www/web1*/web/site*/myfolder
You are using wildcards for the target directory. Are you sure you want this?

Quote:
: No such file or directory: line 12: /bin/sh
In which script do you get this?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 14th November 2006, 15:48
bpmee bpmee is offline
Member
 
Join Date: Aug 2006
Posts: 86
Thanks: 3
Thanked 7 Times in 6 Posts
Unhappy I get that error in the first script with I listed containing the "awk" command

Hi Falko,

Thanks for your reply.

I get that error in the first script I mentioned, the one containing the "awk" command...

I want to use wildcards because I have many folders and divided into various sections throughout each "web1*" designation....

I'm not sure why this is suddenly happening - I had no troubles before yesterday!
Reply With Quote
  #4  
Old 15th November 2006, 15:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by bpmee
I get that error in the first script I mentioned, the one containing the "awk" command...
Please post the contents of that script here.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 15th November 2006, 22:54
bpmee bpmee is offline
Member
 
Join Date: Aug 2006
Posts: 86
Thanks: 3
Thanked 7 Times in 6 Posts
Default Here's the code bit

Hi Falko,

Here's the code.... note, I use various iterations of it, such as web2*, web3*, etc because of the extreme amount of folders and sites on my server...

Code:
find /var/www/web1*/web/site*/myfolder/ -maxdepth 1 -type d | awk '{print "cp -f -R /home/searchfeed.php "$1"/"}' | /bin/sh
echo bm1
* Note, the double wild card is on purpose....

THANKS!
Reply With Quote
  #6  
Old 16th November 2006, 16:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Why do you pipe the output of the command through /bin/sh?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
Strange email problem for one of my domains... any help appreciated paulrobert_a Installation/Configuration 5 9th August 2010 14:15
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
problem with load-balanced mysql cluster MvdB HOWTO-Related Questions 4 16th October 2006 11:15
Postfix+MySQL Problem jasutton Installation/Configuration 1 15th June 2006 16:06


All times are GMT +2. The time now is 02:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.