recurse does not work?
Hi,
I have a directory with some sub directories and all of those have one or more shells scripts.
This script need the execute bit set so I thought a simple chmod -R -v +x ping/*.sh would do it, NOT :-(
Why not? ls does not seem to recurce either so it must be something general I am missing
First a ls of the ping directory that DOES recurse.
-----<quote>---------------------
beheerdertio@einpingme:~$ ls ping -R
ping:
amssan amsstaf amswan einstud getloss-all.sh getloss.sh hglsan hglstaf hglwan rtmsan rtmstaf rtmwan showloss-today.sh showtime-today.sh utrcity utrjcw utrsan utrstaf utrwan
ping/amssan:
pinglog.sh
ping/amsstaf:
pinglog.sh
ping/amswan:
pinglog.sh
ping/einstud:
pinglog.sh
ping/hglsan:
pinglog.sh
ping/hglstaf:
pinglog.sh
ping/hglwan:
pinglog.sh
ping/rtmsan:
pinglog.sh
ping/rtmstaf:
pinglog.sh
ping/rtmwan:
pinglog.sh
ping/utrcity:
pinglog.sh
ping/utrjcw:
pinglog.sh
ping/utrsan:
pinglog.sh
ping/utrstaf:
pinglog.sh
ping/utrwan:
pinglog.sh
-----<quote>---------------------
So now want only the *.sh (shell script) files
beheerdertio@einpingme:~$ ls -R ping/*.sh
ping/getloss-all.sh ping/getloss.sh ping/showloss-today.sh ping/showtime-today.sh
beheerdertio@einpingme:~$ chmod -R -v +x ping/*.sh
mode of 'ping/getloss-all.sh' retained as 0755 (rwxr-xr-x)
mode of 'ping/getloss.sh' retained as 0755 (rwxr-xr-x)
mode of 'ping/showloss-today.sh' retained as 0755 (rwxr-xr-x)
mode of 'ping/showtime-today.sh' retained as 0755 (rwxr-xr-x)
-----<quote>---------------------
But neither recurses into the directories.
Maybe because none of the directories has a *.sh name, how illogical that sounds, that would make the -R option pretty useless I think.
But if that is the case then how do I change all the *.sh files in those directories to an executable, other than doing it one by one.
Bonno Bloksma
Reply to: