Re: [newbie] very very very basic question about ls

2001-12-02 Thread Anuerin G.Diaz


hi navin,

   from what i gather this is what you want to do:

   you have a directory like this

   a-b
-c-b
-c-d
-c-d-b

   and you want to change the permissions of all instances of b (sort of they fill a 
certain naming requirement, right?). if this is the case then you can use a recursive 
script that i got. it goees something like


   #!/bin/bash
   
   #note that this script is stored as $HOME/bin/recscript
   # $1 is the target directory

   cd $1
   chmod +x b # or whatever files in there 

   for entry in `ls` 
   do

 if [ -L $entry ] then
   #this is a linkfile so I dont follow
 elif [ -d $entry ] then

$HOME/bin/recscript $entry
 else
# regular file. do whatever you want. you can even put
# the chmod here if it would be cumbersome above
 fi
   done
   
   #end script



ok so it may be a little brutish but it gets the job done (like removing core files, 
*.class files before archiving, and that sort). feel free to use it as you please.

ciao!


On Fri, 30 Nov 2001 16:54:54 +1100, Navin [EMAIL PROTECTED] wrote:

   Hello people
   
   I have a problem and am trying to fix something
   
   A directories I have on my /home/navin/apps/JBoss directory
   
   has entries of files and directories. Now some of these directories do not 
   have x in the permission. I do not know how they got stripped off or if they 
   were not present at all. I tried changing ownership to myself, changing 
   permissions with chmod +x to directories. It workds but not for 
   subdirectories. It is very cumbersome to go into each subdirectory and do a 
   chmod +x. And I do not want to do chmod -R +x * - for obvious reasons.
   
   Now I was trying to cook up a small script which would go into each directory 
   and do a chmod for me. For that I was trying to get 'ls -Rd' working but it 
   prints 
   
   ./ 
   
   only. I tried 'ls -Rd *' but it prints directories in the current directory 
   only. It does not recurse, i guess, since I gave -d.
   
   Can anyone please solve my problem with the chmod OR with the ls. 
   
   thanks a lot.
   
   regards
   navin
   
   
   


-- 

Programming, an artform that fights back.

===

Anuerin G. Diaz
Design Engineer
25/F Equitable-PCI Tower
ADB Ave. cor. Poveda St.,
Ortigas Center, Pasig City,
Philippines 1605

Tel no: (632) 6383070 loc 75
===



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] very very very basic question about ls

2001-11-29 Thread Navin

Hello people

I have a problem and am trying to fix something

A directories I have on my /home/navin/apps/JBoss directory

has entries of files and directories. Now some of these directories do not 
have x in the permission. I do not know how they got stripped off or if they 
were not present at all. I tried changing ownership to myself, changing 
permissions with chmod +x to directories. It workds but not for 
subdirectories. It is very cumbersome to go into each subdirectory and do a 
chmod +x. And I do not want to do chmod -R +x * - for obvious reasons.

Now I was trying to cook up a small script which would go into each directory 
and do a chmod for me. For that I was trying to get 'ls -Rd' working but it 
prints 

./ 

only. I tried 'ls -Rd *' but it prints directories in the current directory 
only. It does not recurse, i guess, since I gave -d.

Can anyone please solve my problem with the chmod OR with the ls. 

thanks a lot.

regards
navin



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] very very very basic question about ls

2001-11-29 Thread Navin


Hello people

I have a problem and am trying to fix something

A directories I have on my /home/navin/apps/JBoss directory

has entries of files and directories. Now some of these directories do not
have x in the permission. So it doesn't let me change to that directory with 
cd. I get a Permission denied. I do not know how they got stripped off or if 
they were not present at all. I tried changing ownership to myself, changing
permissions with chmod +x to directories. It workds but not for
subdirectories. It is very cumbersome to go into each subdirectory and do a
chmod +x. And I do not want to do chmod -R +x * - for obvious reasons.

Now I was trying to cook up a small script which would go into each directory
and do a chmod for me. For that I was trying to get 'ls -Rd' working but it
prints

./

only. I tried 'ls -Rd *' but it prints directories in the current directory
only. It does not recurse, i guess, since I gave -d.

Can anyone please solve my problem with the chmod OR with the ls.

thanks a lot.

regards
navin

---



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] A Very Very Basic Question

2000-03-17 Thread Tony

I had seen it but it seemed too trivial to carp about a mistake I will
probably make myself particularly when hurried
"Weave a circle round him thrice,
  And close your eyes with holy dread,
  For he on honeydew hath fed,
  And drunk the milk of paradise."  (The linux user)

- Original Message -
From: "Alan Shoemaker" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 17, 2000 1:15 PM
Subject: Re: [newbie] A Very Very Basic Question


 Tonybut you did miss criticizing me for using Linux/UNIX
 slashes in the example instead of windows backslashes. :-)

 Alan


 Tony wrote:
 
  Understood now, I was worrying he would take it literally,   just put it
  down to old age and Altsheimers disease- - - - what was the name of that
  disease??
  "Weave a circle round him thrice,
And close your eyes with holy dread,
For he on honeydew hath fed,
And drunk the milk of paradise."  (The linux user)
 
  - Original Message -
  From: "Alan Shoemaker" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, March 16, 2000 10:06 PM
  Subject: Re: [newbie] A Very Very Basic Question
 
   Tonythat was an example of path info, that's why I wrote an
   i.e. in front of it.
  
   Alan
  
  
   Tony wrote:
   
Alan
he has the image on C:\images\hdimage,   ie. he downloaded direct to
his
hard drive NOT to cdr
"Weave a circle round him thrice,
  And close your eyes with holy dread,
  For he on honeydew hath fed,
  And drunk the milk of paradise."  (The linux user)
   
- Original Message -
From: "Ronald Brown" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
    Sent: Thursday, March 16, 2000 9:25 PM
Subject: Re: [newbie] A Very Very Basic Question
   
 I will try that Alan...Thanks


 - Original Message -
 From: "Alan Shoemaker" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
     Sent: Thursday, March 16, 2000 7:31 PM
 Subject: Re: [newbie] A Very Very Basic Question


  Rondid you include the path info to the image file (ie.
  d:/images/hd.img), or did you really type it as hd.image which
  is incorrect?  Also was a:: appended to that field?  That would
  also be incorrect.  I suggest that you use the dos (rawrite.exe)
  program rather than either of the windows versions.  Run it in a
  dos window.
 
  Alan
 
 
   Ronald Brown wrote:
  
   Hi Group, I do apologize for being so novice. That is what one
   gets for
   working on this all night without rest and I must say thank
   God for adsl :)
  
   It seems that many people are missing my point. I do not have
   the
   installation of Mandrake on a CD-ROM. A plain download to my
   local hard
   drive. My problems seems to come from trying to do a
   RAWRITE.exe I have
   never ran into this before, so it's a learning process. I
   followed the
   directions, but the files I need to write to the floppy want
   write there.
  
   In my mistake of downloading the ISO and using winimage, it
   worked perfect.
   When click the RAWRITE file, it asks for the image source
   fileI enter
   hd.image a:: but nothing. What am I doing wrong?
  
   Thanks,
   Ron Brown
 
 



[newbie] A Very Very Basic Question

2000-03-16 Thread Ronald Brown



Hi Group, I do apologize for being so novice. That 
is what one gets forworking on this all night without rest and I must say 
thank God for adsl :)It seems that many people are missing my point. I 
do not have theinstallation of Mandrake on a CD-ROM. A plain download to my 
local harddrive. My problems seems to come from trying to do a RAWRITE.exe I 
havenever ran into this before, so it's a learning process. I followed 
thedirections, but the files I need to write to the floppy want write 
there.In my mistake of downloading the ISO and using winimage, it worked 
perfect.When click the RAWRITE file, it asks for the image source fileI 
enterhd.image a:: but nothing. What am I doing wrong?Thanks,Ron 
Brown


Re: [newbie] A Very Very Basic Question

2000-03-16 Thread Alan Shoemaker

Rondid you include the path info to the image file (ie.
d:/images/hd.img), or did you really type it as hd.image which
is incorrect?  Also was a:: appended to that field?  That would
also be incorrect.  I suggest that you use the dos (rawrite.exe)
program rather than either of the windows versions.  Run it in a
dos window.

Alan


 Ronald Brown wrote:
 
 Hi Group, I do apologize for being so novice. That is what one
 gets for
 working on this all night without rest and I must say thank
 God for adsl :)
 
 It seems that many people are missing my point. I do not have
 the
 installation of Mandrake on a CD-ROM. A plain download to my
 local hard
 drive. My problems seems to come from trying to do a
 RAWRITE.exe I have
 never ran into this before, so it's a learning process. I
 followed the
 directions, but the files I need to write to the floppy want
 write there.
 
 In my mistake of downloading the ISO and using winimage, it
 worked perfect.
 When click the RAWRITE file, it asks for the image source
 fileI enter
 hd.image a:: but nothing. What am I doing wrong?
 
 Thanks,
 Ron Brown



Re: [newbie] A Very Very Basic Question

2000-03-16 Thread Ronald Brown

I will try that Alan...Thanks


- Original Message - 
From: "Alan Shoemaker" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 16, 2000 7:31 PM
Subject: Re: [newbie] A Very Very Basic Question


 Rondid you include the path info to the image file (ie.
 d:/images/hd.img), or did you really type it as hd.image which
 is incorrect?  Also was a:: appended to that field?  That would
 also be incorrect.  I suggest that you use the dos (rawrite.exe)
 program rather than either of the windows versions.  Run it in a
 dos window.
 
 Alan
 
 
  Ronald Brown wrote:
  
  Hi Group, I do apologize for being so novice. That is what one
  gets for
  working on this all night without rest and I must say thank
  God for adsl :)
  
  It seems that many people are missing my point. I do not have
  the
  installation of Mandrake on a CD-ROM. A plain download to my
  local hard
  drive. My problems seems to come from trying to do a
  RAWRITE.exe I have
  never ran into this before, so it's a learning process. I
  followed the
  directions, but the files I need to write to the floppy want
  write there.
  
  In my mistake of downloading the ISO and using winimage, it
  worked perfect.
  When click the RAWRITE file, it asks for the image source
  fileI enter
  hd.image a:: but nothing. What am I doing wrong?
  
  Thanks,
  Ron Brown
 
 



Re: [newbie] A Very Very Basic Question

2000-03-16 Thread Tony



never done it this way but your image source in this 
case  would have to be C in whatever directory you downloaded to.
"Weave a circle round him thrice, And close your eyes with holy 
dread, For he on honeydew hath fed, And drunk the milk of 
paradise." (The linux user)

  - Original Message - 
  From: 
  Ronald 
  Brown 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, March 16, 2000 7:25 
  PM
  Subject: [newbie] A Very Very Basic 
  Question
  
  Hi Group, I do apologize for being so novice. 
  That is what one gets forworking on this all night without rest and I must 
  say thank God for adsl :)It seems that many people are missing my 
  point. I do not have theinstallation of Mandrake on a CD-ROM. A plain 
  download to my local harddrive. My problems seems to come from trying to 
  do a RAWRITE.exe I havenever ran into this before, so it's a learning 
  process. I followed thedirections, but the files I need to write to the 
  floppy want write there.In my mistake of downloading the ISO and using 
  winimage, it worked perfect.When click the RAWRITE file, it asks for the 
  image source fileI enterhd.image a:: but nothing. What am I doing 
  wrong?Thanks,Ron Brown


Re: [newbie] A Very Very Basic Question

2000-03-16 Thread Jon Hunter

Tony wrote:

 never done it this way  but your image source in this case would have
 to be C in whatever directory you downloaded to."Weave a circle round
 him thrice,
   And close your eyes with holy dread,
   For he on honeydew hath fed,
   And drunk the milk of paradise."  (The linux user)

  - Original Message -
  From: Ronald Brown
  To: [EMAIL PROTECTED]
  Sent: Thursday, March 16, 2000 7:25 PM
  Subject: [newbie] A Very Very Basic Question
   Hi Group, I do apologize for being so novice. That is what
  one gets for
  working on this all night without rest and I must say thank
  God for adsl :)

  It seems that many people are missing my point. I do not
  have the
  installation of Mandrake on a CD-ROM. A plain download to my
  local hard
  drive. My problems seems to come from trying to do a
  RAWRITE.exe I have
  never ran into this before, so it's a learning process. I
  followed the
  directions, but the files I need to write to the floppy want
  write there.

  In my mistake of downloading the ISO and using winimage, it
  worked perfect.
  When click the RAWRITE file, it asks for the image source
  fileI enter
  hd.image a:: but nothing. What am I doing wrong?

  Thanks,
  Ron Brown

Are you saying that you are able to reach into the iso image and grab
files out?

You can do this in linux but I haven't seen it in Windoze, tell me
more...