Re: Bash Script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wrote:
Alexander Dalloz wrote:
Vivek J. Patankar schrieb:
John Pierce wrote:
Does anyone know of a bash script that will recurse through a series
of directories and strip the executable bit from the files in those
directories and not the directories.
This worked for me.

$ find /path -type f -print | xargs chmod ugo-x

Caution, be aware of file names with spaces ;)

You're right... doesn't work with spaces in file names.

A quick peek at the xargs man pages and we have a winner. :-)

$ find /path -xdev -type f -print0 | xargs -0 chmod ugo-x

--
Regards,
विवेक ज. पाटणकर (Vivek J. Patankar)

Registered Linux User #374218
Fedora release 7 (Moonshine)
Linux 2.6.21-1.3228.fc7 x86_64


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux