[regarding for-loops that can break]
I disagree. Any runtime that can't iterate over its own arrays is badly broken.
The problem is not the iteration in itself. The problem is that expanding an array like "${array[*]}" might lead to a line that is longer than "MAXLINE" and/or consisting of more elements than "MAXARGS" allows for. You can experience the same phenomenon when using
Thi swill work well for any "normal" directory, but might break with a "line too long" if there are awful lots of entries in there. Instead of the for-loop the while-loop will not break:
I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit.
Logically, I'm looking for the best way to approach this
Thanks for any assistance in advance.
Note: I'm using a C shell and... (2 Replies)
Hi,
When I listed one directory in Sun, it showed that :
-rwsr-xr-x 1 root bsmbin 78004 Oct 21 2004 bsmprsm
I don't know meaning of the character "s" in "rws" above. I have searched in Sun admin documents but no result. Would you please explain it ? :)
Thank you so much. (1 Reply)
Hello,
I am doing a transfer of a file from one HP-UX ( umask : 033 ) server to another HP-UX server ( umask : 033 ) and file got transferred sucessfully. However I could see the file permission gets changed at the receiving end. Would like to know the reason for that?
Details below:
... (3 Replies)
Hello,
i need some help/advice on how to solve a particular problem.
these are the users:
|name | group |
---------- ---------------
|boss | department1 |
|assistant | department1 |
|employee | department1 |
|spy | department2 |
this is the... (0 Replies)
Hi,
What is the command to check the user's permission in UNIX ?
e.g: user in UNIX is "myuser"
The result should be number format. e.g: 755, 644, etc...
Thanks.. :) (3 Replies)
Advance Thanks.
(1) I would like to know any unix/Linux command to check EOF char in a file.
(2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
Hi,
I have requirement to get a file from a remote location using SFTP only if the file has read/write permission either to the user or to the group.
Currently i m taking the ls of the required file and storing it in a flat file to check the file permission.
Please advice is there any... (3 Replies)
Hi,
I am writing some shell script to check the file owner permission whether the write bit is turn on. If it is turn on it will copy the file to the destination else it will just prompt user to change the file and skipping it.
However, I am starting getting loss here as I have couple of... (2 Replies)
I want to check access rights permissions not for 'user', not for 'group', but for 'others'.
I want to do it by system command in which i want to use 'ls -l' and 'awk' command.
I have written the following program :
#!/usr/bin/local/perl
#include <stdlib.h>
system ("ls -l | awk... (1 Reply)
Hi,
Could you please tell me the OS command to grant as similar to below permission?
rwxrwxr-x
OS -- HP-UX
Regards,
Maddy (8 Replies)
Discussion started by: Maddy123
8 Replies
LEARN ABOUT OPENSOLARIS
check-permissions
check-permissions(1M) System Administration Commands check-permissions(1M)NAME
check-permissions - check permissions on mail rerouting files
SYNOPSIS
/usr/sbin/check-permissions [login]
DESCRIPTION
The check-permissions script is intended as a migration aid for sendmail(1M). It checks the /etc/mail/sendmail.cf file for all configured
alias files, and checks the alias files for :include: files. It also checks for certain .forward files. For each file that check-permis-
sions checks, it verifies that none of the parent directories are group- or world-writable. If any directories are overly permissive, it is
reported. Otherwise it reports that no unsafe directories were found.
As to which .forward files are checked, it depends on the arguments included on the command line. If no argument is given, the current
user's home directory is checked for the presence of a .forward file. If any arguments are given, they are assumed to be valid logins, and
the home directory of each one is checked.
If the special argument ALL is given, the passwd entry in the /etc/nsswitch.conf file is checked, and all password entries that can be
obtained through the switch file are checked. In large domains, this can be time-consuming.
OPERANDS
The following operands are supported:
login Where login is a valid user name, checks the home directory for login.
ALL Checks the home directory of all users.
FILES
/etc/mail/sendmail.cf Defines environment for sendmail
/etc/mail/aliases Ascii mail aliases file
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsndmu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO getent(1M), sendmail(1M), aliases(4), attributes(5)SunOS 5.11 10 Nov 2003 check-permissions(1M)