There is a Unix environment named sftwrk01, uatwrk01, intwrk01 and some more
I need to check the logs in each environment everyday by login in as below (through pbsu which is a wrapper for pbrun):
$pbsu - sftwrk01 //this helps to login to sftwrk01
and then after login I check the logs.
The same process goes for a few more environments like uatwrk01, intwrk01 etc.
Now I tried this:
$pbsu - sftwrk01 && cd var/can/log && ls -lrt
but this did not work because actually the statement cd var/can/log && ls -lrt was being executed after I exited from the sftwrk01 environment by typing exit.
What could be the different possible solutions considering I don't have administrator rights? (i.e I am just one of the users in the home directory.)
If this is not possible without administrator rights then you can mention a way you could do it with having full permission (perhaps you would edit the some .profile file to do that)
**OS Info :**
rcihp145 :/home/msingh2> uname -a
HP-UX rcihp145 B.11.23 U 9000/800 3683851961 unlimited-user license
Other info:
rcihp145 :/home/msingh2> ls -lrta
total 7296
-r--r--r-- 1 msingh2 users 438 Dec 22 2010 .profile
drw------- 2 msingh2 users 96 Dec 22 2010 .ssh
-r--r--r-- 1 msingh2 users 831 Dec 22 2010 .cshrc
-r--r--r-- 1 msingh2 users 347 Dec 22 2010 .exrc
-r--r--r-- 1 msingh2 users 333 Dec 22 2010 .login
-rw------- 1 msingh2 users 56 Dec 23 2010 .sh_history.
-rwxr-xr-x 1 msingh2 users 5451 Dec 23 2010 .dtprofile
-rw------- 1 msingh2 users 3577932 May 18 05:21 core
drwxr-xr-x 422 root root 16384 Aug 3 14:27 ..
-rw------- 1 msingh2 users 245 Aug 4 00:41 .Xauthority
-rw------- 1 msingh2 users 1768 Aug 4 00:41 .TTauthority
drwxr-xr-x 4 msingh2 users 8192 Aug 4 00:41 .
-rw------- 1 msingh2 users 37533 Aug 4 00:41 .ICEauthority
-rw------- 1 msingh2 users 4064 Aug 4 06:28 .sh_history
drwxr-xr-x 12 msingh2 users 8192 Aug 4 06:28 .dt
-rw------- 1 msingh2 users 3462 Aug 5 02:29 .sh_history.msingh2
here is pbsu
pbsuscript?pbsuscript is written, you would have to do either (modify.profileorpbsu).