LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-23-2006, 11:03 AM   #1
Bonestein
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 11:07 AM.
 
Old 03-23-2006, 11:14 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
You would do something like this
Code:
#find / -name "*.test" -exec chmod 751 {} \;
 
Old 03-23-2006, 11:18 AM   #3
mikshaw
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:
Code:
for i in `find / -name *.test`; do chmod 751 $i;done
 
Old 03-23-2006, 11:18 AM   #4
Bonestein
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 11:24 AM.
 
  


Reply


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 03:34 AM
Gettext test froze my system...Now I cant find anything!!!!!!!!!!!!!!!! matthewa Linux From Scratch 3 06-04-2005 05:26 PM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 09:53 PM
Why my debian test can't find my network card any more? bloor Linux - Hardware 1 05-25-2004 06:40 AM
Core 2 Test 2 can't find suitable devices... robza Fedora - Installation 0 05-01-2004 09:20 AM


All times are GMT -5. The time now is 12:32 AM.

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