Running chmod on files with a particular extension
hi everyone
I have a directory with a lot of subdirectories and files. How can I write a bash script that add x permissions to .sh files only. or how can I change owner of files that has .sh extension? thanks in advance
Retired Community Manager -- Banned from Texas by popular demand.
Join Date: Sep 2007
Location: NYC
Posts: 8,142
I've moved the thread to programming, which seems more suited. I've also given it a more specific title. (Busy people tend to just skip threads with vague titles)
I suspect you want to use find with either -exec or xargs to do this. I would try starting by googling for
No need for find as we know where they are located. We simply need -R to recursively poll the sub directories for *.sh files and then act upon them.
Ibbo
__________________
A Hangover Lasts A Day, But Our Drunken Memories Last A Lifetime
--
Linux user #349545
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCfdjyzXscddzQvlhBedAcD7qfKmHo==zx0H