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 )
Food for thought.
Say if there are 10 .sh files under the directory DIR, the above find command will be executed 10 times in total and gives the output to chmod command each time its executed. Whereas if we use xargs along with find, the find command is executed only once ,outputs the 10 files names to xargs and xargs takes the job of appending the file to chmod. So we save the number of processes run thereby reducing the execution time. If we have many number of files under a directory then xargs would be a better option.
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)
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)
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)
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)
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)
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)
: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)
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)
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
LEARN ABOUT OSF1
apply
apply(1) General Commands Manual apply(1)NAME
apply - Applies a command to a set of arguments
SYNOPSIS
apply [-acharacter] [-number] command argument...
The apply command runs the specified command on each argument in turn.
OPTIONS
Identifies the character used instead of the % (percent sign) to designate argument substitution strings. Specifies the number of argu-
ments to be passed to command.
DESCRIPTION
Normally, arguments are chosen individually; the optional number specifies the number of arguments to be passed to command. If number is 0
(zero), command is run without arguments once for each argument.
If you include character sequences of the form %n (where n is a digit from 1 to 9) in command, they are replaced by the nth unused argument
following command when command is executed. If any such sequences occur, number is ignored, and the number of arguments passed to command
is the maximum value of n in command.
You can specify a character other than % (percent sign) to designate argument substitution character strings with the -a option; for exam-
ple, -a@ would indicate that the sequences @1 and @2 were to be replaced by the first and second unused arguments following command.
NOTES
Shell metacharacters in command may have undesirable effects; it is best to enclose complicated commands in ' ' (single quotes).
There is no way to pass a % (percent sign) followed immediately by any number if % is the argument expansion character.
EXAMPLES
The following command is similar to ls: apply echo * The following command compares the file a1 to the file b1, a2 to b2, and so on: apply
-2 cmp a1 b1 a2 b2 ... The following command runs who 5 times: apply -0 who 1 2 3 4 5 The following command links all files in the current
directory to the directory /usr/joe: apply 'ln %1 /usr/joe' *
SEE ALSO
Commands: sh(1), xargs(1)apply(1)