Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank).
In a first approach I coded:
find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt
But this doesn't work. I got an error (under Ubuntu):
grep:... (5 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
I am new to bash/shell scripting.
I want to find all the files in directory and subdirectories, which are not ends with “.zip” and which are contains in the file name “*.log*” or “*.out*”.
I know below command to get the files which ends with “.log”; but I need which are not ends with this... (4 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
These three finds worked as expected:
$ find . -iname "*.PDF"
$ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \)
$ find . -path "*_nobackup*" -prune -iname "*.PDF"
They all returned the match:
./folder/file.pdf
:b:
This find returned no matches:
$ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies
LEARN ABOUT SUNOS
nischmod
nischmod(1) User Commands nischmod(1)NAME
nischmod - change access rights on a NIS+ object
SYNOPSIS
nischmod [-AfLP] mode name...
DESCRIPTION
nischmod changes the access rights (mode) of the NIS+ objects or entries specified by name to mode. Entries are specified using indexed
names (see nismatch(1)). Only principals with modify access to an object may change its mode.
mode has the following form:
rights [, rights]...
rights has the form:
[ who ] op permission [ op permission ]...
who is a combination of:
n Nobody's permissions.
o Owner's permissions.
g Group's permissions.
w World's permissions.
a All, or owg.
If who is omitted, the default is a.
op is one of:
+ To grant the permission.
- To revoke the permission.
= To set the permissions explicitly.
permission is any combination of:
r Read.
m Modify.
c Create.
d Destroy.
Unlike the system chmod(1) command, this command does not accept an octal notation.
OPTIONS
The following options are supported:
-A Modify all entries in all tables in the concatenation path that match the search criteria specified in name. This option implies
the -P switch.
-f Force the operation and fail silently if it does not succeed.
-L Follow links and change the permission of the linked object or entries rather than the permission of the link itself.
-P Follow the concatenation path within a named table. This option is only applicable when either name is an indexed name or the -L
switch is also specified and the named object is a link pointing to an entry.
EXAMPLES
Example 1: Using the nischmod Command
This example gives everyone read access to an object. (that is, access for owner, group, and all).
example% nischmod a+r object
This example denies create and modify privileges to group and unauthenticated clients (nobody).
example% nischmod gn-cm object
In this example, a complex set of permissions are set for an object.
example% nischmod o=rmcd,g=rm,w=rc,n=r object
This example sets the permissions of an entry in the password table so that the group owner can modify them.
example% nischmod g+m '[uid=55],passwd.org_dir'
The next example changes the permissions of a linked object.
example% nischmod -L w+mr linkname
ENVIRONMENT VARIABLES
NIS_PATH If this variable is set, and the NIS+ name is not fully qualified, each directory specified will be
searched until the object is found (see nisdefaults(1)).
EXIT STATUS
The following exit values are returned:
0 Successful operation.
1 Operation failed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnisu |
+-----------------------------+-----------------------------+
SEE ALSO chmod(1), nis+(1), nischgrp(1), nischown(1), nisdefaults(1), nismatch(1), nis_objects(3NSL), attributes(5)NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are
available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html.
SunOS 5.10 10 Dec 2001 nischmod(1)