Need help with modifying the script to login as different users in the same server
Hi
I have wrote the below script to delete old files.
But i need help in modifying it in a way that the script can login as different users in the same server.
My server has different domains and each owned by their respective application id.
This script has to be run seperately for every domain in the same server,which is not effective.Hence i want to modify in a way that the script can login in as all app id users and perform the deletion.
wlmkone@palio$ cat script3.ksh
#!/bin/sh
output=$(df -k /prod/msp/logs | tail -1 | awk '{print $4}' | sed 's/%//g'
echo $output
if [ "$output" -gt "70" ]; then
find /prod/msp/logs ! -name "STOPMASTER*" ! -name "STARTMASTER*" -type f -mtime +1 -exec ls -t {} \;
fi
wlmkone@palio$
Note: Here wlmkone is one of the application ids.The server has 6 different applications like this.
|