10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
he below looks in $dir for any pattern of fileone. As is, it executes but only returns File found if the exact format in the script exsists. Why isn't a pattern of fileone being looked for and if it is in $dir, File found. I think that is what should happen. Thank you :).
dir=/path/to
if... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. UNIX for Dummies Questions & Answers
I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms.
Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
3. Shell Programming and Scripting
To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies
4. Shell Programming and Scripting
Hi,
I have(ksh):
...
while ]
do
fullPath=$(grep -s '/' $1 | wc -l)
echo $fullPath
if ]; then
fi
echo "Wrong, full path"
shift
done
...
I tried to do: (5 Replies)
Discussion started by: chish
5 Replies
5. Shell Programming and Scripting
I have a script that runs a console/terminal command on the server and what is want is for each of the multiple success reports fed back from the clients (echo-ed out onto the conosle) to be counted and after x number of reports reboot the server.
The Details:
The command (program) is... (0 Replies)
Discussion started by: dp123
0 Replies
6. Shell Programming and Scripting
Hi ,
I am new to shell scripting. i have a requirement say i will receive a file in a directory say /xyz.if that file stays in that directory more than 30 min i need to get a mail to my outlook.this should run for every 20 min in crontab.
can anyone help me? (8 Replies)
Discussion started by: muraliinfy04
8 Replies
7. UNIX for Dummies Questions & Answers
find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF;i++){d=length($i);if ( d < 5 && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}' FS='/'
Can someone explain how this works..??
How can i add directory size to be listed in the above command's output..?? (1 Reply)
Discussion started by: vikram3.r
1 Replies
8. Solaris
Hi,
We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB?
I have seen this before we an Oracle temp file... (6 Replies)
Discussion started by: sparcman
6 Replies
9. UNIX for Dummies Questions & Answers
Hi Guys, I'm running a cron that mails me a file every night. The file is based on form input from the web and each evening after I mail it I delete and start a new file by the same name. It's a csv file so I preload a line of headers into the file. So far, so good. On days when no one inputs... (5 Replies)
Discussion started by: steven99
5 Replies
10. Shell Programming and Scripting
Did not use 'wait' yet.
How I understand by now the wait works only for child processes, started background.
Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?)
I need to start a background process, witch will be waiting... (2 Replies)
Discussion started by: alex_5161
2 Replies
su(1) General Commands Manual su(1)
NAME
su - Substitutes user ID temporarily
SYNOPSIS
su [- | -f] [user] [shell_option] [shell_command]
OPTIONS
Prevents the user's shell initialization file from being executed by passing the -f option to the user's shell, thus making su start up
faster. The -f option is supported by the csh family of shells. Simulates a full login by executing the commands in either the and files
for csh or the file for sh and ksh and by setting the current working directory to the user's home directory. Passes the specified shell
option flag to the newly invoked user's shell for execution. The shell_option must be supported by the invoked shell. The csh, sh, ksh, and
any other interactive command shell support the commonly used -c shell option. By default (no "shell_option"), the shell is opened with the
-i (interactive) shell option. See the reference page for the shell you are using for more information on the shell options. Passes the
specified command to the newly invoked user's shell for execution. The shell_command must be supported by the invoked shell.
DESCRIPTION
The su command demands the password of the specified user, and if it is given, changes to that user and invokes the user's shell without
changing the current directory.
Except in a case where the - option is used, the user environment is unchanged except for HOME, SHELL, USER, and LOGNAME which are taken
from the password file for the user being substituted (see environ). The new user ID stays in force until the shell exits.
If no user is specified, root is assumed. Only users who belong to group number 0 (system) can issue su to become root, even with the root
password. To remind superusers of their responsibilities, the shell substitutes a # (number sign) for its usual prompt.
Shell commands may be passed to the shell that is spawned by su by including them on the command line after the su flags and arguments.
After the flags recognized by su and the user argument are processed, unrecognized command line flags (shell_options) and/or arguments
(shell_commands) are passed to the shell for execution. If the spawned shell does not support the command or the format of the command, the
command is not executed and the resulting shell behavior and error messages are determined by the shell.
Security Restrictions
The su command fails if any lock conditions exist on the target account. Specifically, if the destination account was retired, if the num-
ber of unsuccessful login attempts exceeds the maximum allowed, if the administrative lock was applied, or the password's lifetime was
exceeded, the Information System Security Officer (ISSO) must unlock the destination account before any user can log in to it or use su to
transition to it.
SECURITY NOTE
This security-sensitive command uses SIA (Security Integration Architecture) as an interface to the security mechanism(s) that perform the
actual user validation. See the matrix.conf(4) reference page for more information.
ENVIRONMENT VARIABLES
The following environment variables affect the behavior of su:
SEE ALSO
Commands: csh(1), ksh(1), sh(1)
su(1)