Sponsored Content
Top Forums Shell Programming and Scripting [Solved] apply 755 mode recursively Post 302551049 by wabard on Monday 29th of August 2011 07:57:14 AM
Old 08-29-2011
Quote:
Originally Posted by yazu
Code:
find DIR -name '*.sh' | xargs chmod 755

I note a lot of people use xargs (quite useful)... however, the find command has a -exec option which seems to not be very popular (I use it all the time Smilie)

Code:
find DIR -name '*.sh' -exec chmod 755 {} \;

Food for thought.
This User Gave Thanks to wabard For This Post:
 

9 More Discussions You Might Find Interesting

1. AIX

dir 755 files 754

how to give permission in single command for .. All the sub-directories have to become permission 755 and files must be 754... do we have any option in chown .. or we have write script. any ideas please ... (2 Replies)
Discussion started by: govindarajan
2 Replies

2. Homework & Coursework Questions

changing permissions of a file whos name was passed to 755

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a shell script that gives a passed file the "755" access permissions. The shell script should: Change... (0 Replies)
Discussion started by: anix007
0 Replies

3. Homework & Coursework Questions

changing permissions of a file whos name was passed to 755

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a shell script that gives a passed file the "755" access permissions. The shell script should: Change... (5 Replies)
Discussion started by: anix007
5 Replies

4. Shell Programming and Scripting

sed : regular expression (hungry mode ?) solved

Hi there is something I don't understand with the repeated element. With the following command I have a weird output: :confused: while I thought the output would be I really don't understand why 2 "a" are skipped. Might someone explain please? (5 Replies)
Discussion started by: xib.be
5 Replies

5. Solaris

[Solved] How to change my default login mode????

Hi guys, I have just installed Solaris 10 x86. My system boots into graphical login by default, I want to have text login only, where can I change that. I tried to use the linux and bsd concept of editing /etc/inittab, and change the default value to 3, but that doesn't work in Solaris. Please... (6 Replies)
Discussion started by: gabam
6 Replies

6. Fedora

[SOLVED] How to be the ROOT through GUI mode in fedora 15

Whenevr i am trying to access ROOT file in Fedora 15 by double clicking, its showing I dont have enough permission to access it and its not showing the inside access... How to solve it?? (4 Replies)
Discussion started by: amisubha
4 Replies

7. Solaris

DNS service is in maintenance mode. How to bring it back to online mode?

:confused: when i tried to look the status of DNS-client, it is in maintenance mode..... Please tell me how to bring it back to online mode...PLEASE TELL ME STEP BY STEP.... PLEASE... :wall: (2 Replies)
Discussion started by: vamshigvk475
2 Replies

8. Solaris

[Solved] Can't get into single user mode - sulogin was disabled

Solaris 10 trying to patch and therefore want to do this from single user mode I do a init 0 get's me to ok> :) ok> boot -s I was a UK Sun Field Engineer for 10 years ..... I've used "boot -s " quite a bit ..... I get a console login , which I subsequently login into #who... (13 Replies)
Discussion started by: Martincorneuk
13 Replies

9. Red Hat

[Solved] Redhat system is not booting in GUI mode

Hi Guys Required help in Redhat 6.1. After installation of Redhat 6.1 in VMware system is not going in GUI mode. please to solve the issue... Thanks... (5 Replies)
Discussion started by: deviltech
5 Replies
APPLY(1)						    BSD General Commands Manual 						  APPLY(1)

NAME
apply -- apply a command to a set of arguments SYNOPSIS
apply [-a c] [-d] [-#] command argument ... DESCRIPTION
The apply utility runs the named command on each argument argument in turn. Character sequences of the form ``%d'' in command, where 'd' is a digit from 1 to 9, are replaced by the d'th following unused argument. In this case, the largest digit number of arguments are discarded for each execution of command. The options are as follows: -# Normally arguments are taken singly; the optional number -# specifies the number of arguments to be passed to command. If the number is zero, command is run, without arguments, once for each argument. If any sequences of ``%d'' occur in command, the -# option is ignored. -a c The use of the character '%' as a magic character may be changed with the -a option. -d Display the commands that would have been executed, but do not actually execute them. ENVIRONMENT
The following environment variable affects the execution of apply: SHELL Pathname of shell to use. If this variable is not defined, the Bourne shell is used. EXAMPLES
apply echo a* is similar to ls(1); apply -2 cmp a1 b1 a2 b2 a3 b3 compares the `a' files to the `b' files; apply -0 who 1 2 3 4 5 runs who(1) 5 times; and apply 'ln %1 /usr/joe' * links all files in the current directory to the directory /usr/joe. FILES
/bin/sh default shell AUTHORS
Rob Pike BUGS
Shell metacharacters in command may have bizarre effects; it is best to enclose complicated commands in single quotes (''). HISTORY
The apply command appeared in 4.2BSD. BSD
April 4, 1994 BSD
All times are GMT -4. The time now is 09:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy