View Single Post

  #1 (permalink)  
Old 05-18-2008, 01:47 PM
vikas027 vikas027 is offline
Member
User
 
Join Date: Oct 2007
My distro: Linux RHEL 5
Posts: 33
Rep Power: 0
vikas027 is on a distinguished road
Question create command aliases for a user

Hi all,

I am using Solaris 10 OS on X86. When I add a new user from command
Code:
useradd -d /export/home/vikas -m -s /bin/bash vikas
files local.cshrc, local.login, local.profile and .profile get copied to my home directory (i.e. /export/home/vikas) from /etc/skel/

Which file I have to change to make command aliases and what is the format ?
for e.g. making alias of ls as ls -lrt.

Like in Linux, we have to change .bash_profile as
Code:
ls='ls -lrt'; export ls
to have this effect.

I tried this on local.profile and .profile but it wasnt working.

Also, suppose I need that each time a user logs in a script say /tmp/vikas.sh executes. How to achieve this ? Pls help !

Thanks and Regards,
Vikas
Reply With Quote