Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-23-2006, 10:03 AM   #1
LQ Newbie
Registered: Mar 2006
Posts: 3

Rep: Reputation: 0
find / -name *.test | chmod 751

What I am trying to do is take the output of

find / -name *.test

and change the permissions on each file

like a

find / -name *.test | chmod 751

but that doesn't work. so does anyone know how to make it work?

P.S. Each .test file is in a different directory and subfolder

Last edited by Bonestein; 03-23-2006 at 10:07 AM.
Old 03-23-2006, 10:14 AM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
You would do something like this
#find / -name "*.test" -exec chmod 751 {} \;
Old 03-23-2006, 10:18 AM   #3
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Just for the sake of options, here's another way:
for i in `find / -name *.test`; do chmod 751 $i;done
Old 03-23-2006, 10:18 AM   #4
LQ Newbie
Registered: Mar 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the help

this worked

find / -name \*.test -exec chmod 755 {} \;

Last edited by Bonestein; 03-23-2006 at 10:24 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache can not to find test web page backpacker Linux - Newbie 2 09-16-2005 02:34 AM
Gettext test froze my system...Now I cant find anything!!!!!!!!!!!!!!!! matthewa Linux From Scratch 3 06-04-2005 04:26 PM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
Why my debian test can't find my network card any more? bloor Linux - Hardware 1 05-25-2004 05:40 AM
Core 2 Test 2 can't find suitable devices... robza Fedora - Installation 0 05-01-2004 08:20 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration