Look at this bit of code (the best would be that you use it and see its output...) and see if inspiration comes, it should with the Hints given to you...
I have a script that deletes obselete users from /etc/passwd then moves their home directories to another location. After 30 days, I need to delete the home directories that were moved to the new location. I would appreciate any ideas on how to delete the directories after the 30 days? (2 Replies)
Hi!
Need your help. How can I delete the cache folder of multiple user home directories via automatically executed shell script on a Mac OS X Server?
Example:
The userdata are stored on a Xsan Volume like this:
/Volumes/Xsan/userdata/mike
/Volumes/Xsan/userdata/peter... (2 Replies)
Hi, I'm currently working on my school assignment on how to verify that all user home directories are writable only by their owner on Solaris with VMware. But I'm not sure why my codes take a very long time to display the results. My friend says it's the `su - $i -c "ls -ld" 2> /dev/null | grep... (1 Reply)
Hi all
i am using solaris 10, i am creating user with
useradd -d/home/user -m -s /bin/sh user
user is created with in the following path
/export/home/user (auto mount)
i need the user to be created like this
(/home as default home directory )
useradd -d /home/user -m -s /bin/sh... (2 Replies)
I've allocated /exports for all user directories by making separate directories under /exports.....
:rolleyes:
now i need to unmount /exports . But i'm unable to do that..
How can i troubleshoot this issue.
Thanks in advance:D (2 Replies)
what is wrong with this script?
I get:
./perm.sh: command substitution: line 21: unexpected EOF while looking for matching `"'
./perm.sh: command substitution: line 22: syntax error: unexpected end of file
Script:
#!/bin/bash
for dir in `/bin/cat /etc/passwd | /bin/egrep -v... (4 Replies)
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
We have regularly questions about how to create users and user accounts. But regularly user accounts need to be deleted too. It is quite easy to delete the user account itself but usually the HOME directory of the user remains.
It is good style to remove these directories but simply deleting... (3 Replies)
Discussion started by: bakunin
3 Replies
LEARN ABOUT SUNOS
print
print(1) User Commands print(1)NAME
print - shell built-in function to output characters to the screen or window
SYNOPSIS
ksh
print [ -Rnprsu [n]] [arg...]
DESCRIPTION
ksh
The shell output mechanism. With no flags or with flag - or -, the arguments are printed on standard output as described by echo(1).
OPTIONS
The following options are supported:
-n suppresses new-line from being added to the output.
-R
-r (raw mode) ignore the escape conventions of echo. The -R option will print all subsequent arguments and options other than
-n.
-p causes the arguments to be written onto the pipe of the process spawned with |& instead of standard output.
-s causes the arguments to be written onto the history file instead of standard output.
-u [ n ] flag can be used to specify a one digit file descriptor unit number n on which the output will be placed. The default is 1.
EXIT STATUS
The following exit values are returned:
0 Successful operation.
>0 Output file is not open for writing.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO echo(1), ksh(1), attributes(5)SunOS 5.10 15 Apr 1994 print(1)