commands after .profile modification not working


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users commands after .profile modification not working
# 1  
Old 10-13-2008
commands after .profile modification not working

Hi ,

I have modified .profile and after that i ran it as .profile. Now no command i working even ls is not working
When i type ls , it is showing that -ksh not found

I tried to run as . $home/.profile , it is saying as permission denied .

How can we do that .. any idea..

Thanks in advance,
Arun
# 2  
Old 10-13-2008
Not sure what exactly the changes you did in .profile; but do login again to run your .profile.

By using . $HOME/.profile (prefacing the script name with a "." ) you are trying to run the script within the context of the login session, Try running by creating the sub shell.

$HOME/.profile

-Regards
# 3  
Old 10-13-2008
Sounds like you've managed to clobber your PATH. Try PATH=/usr/bin; export PATH and then see if commands like ls are found again. Then examine your .profile and see where you went wrong...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Tilde commands not working

Hi I have a script that it sends emails to various recipients using mailx, but some of the recipients should be sent as BCC, but ~b flag when used in the following line, does not put the gmail address as BCC: echo "node $output is down" | mailx -s "$output not pinging" sadf@xyz.com ~b... (8 Replies)
Discussion started by: fretagi
8 Replies

2. UNIX and Linux Applications

mplayer snapshot commands not working

About 8-12 months ago I wrote a script that pulled together several mplayer commands to perform various activities. One allowed me to press the s-key to take snapshots with my webcam. Useful for recording the sensors I build. Now it: vd=0 bash-4.1$ TV1="-tv... (2 Replies)
Discussion started by: slak0
2 Replies

3. UNIX for Advanced & Expert Users

user .profile file not working

Hi All, I tried creating a .profile file but it is not working even after exiting the session. But before that I will give a quick background. I log into UNIX(SUN - ksh) and then SUDO to another user. After that I change DIRECTORY. In this DIRECTORY I tried creating the profile file but it... (4 Replies)
Discussion started by: sumeet
4 Replies

4. Solaris

After giving Bash the .profile settings are not working

I am using Solaris ... I have some settings in my .profile and in .profile iam calling some scripts. After i logged in to that box if i gave "bash" and proceed with my shorcuts(alias) are not working . (3 Replies)
Discussion started by: girija
3 Replies

5. Shell Programming and Scripting

Commands not working in script file

Hi All, I have created a shell script having some general copying and moving commands. Commands are working fine in Shell but while executing the shell script it is showing an error mv: cannot stat `/apps/orarpt/in/*': No such file or directory command is mv $IN_DIR* $ARCHIVE_DIR where... (5 Replies)
Discussion started by: maindola.amit
5 Replies

6. Fedora

wall and write commands are not working

hi friends i am using fedora linux operating system on the server and two clients(with windows os) are connected to it(server ).but here wall and write cmds are not working to send messages from one system to another system . pls help me (4 Replies)
Discussion started by: sankar_vitam
4 Replies

7. Solaris

/etc/profile file edited. No command working

I have X4500 and I created a user. I wanted to give him root privileges and for editing the sudoers files I typed visudo sudoers. But it said visudo command not found. After googling I found that we need to set path in etc/profile. I edited that and put the following command ... (3 Replies)
Discussion started by: bharu_sri
3 Replies

8. Shell Programming and Scripting

How to get shell commands working through ruby?

Hi all, I am a newbie currently trying to execute shell commands from ruby instead of a shell script.(This method is conceived only for solaris so no issues with porting to other OS and all) Eg: Consider the command 'ls" with a shell script ,I would use it like this bash# ls <all the... (4 Replies)
Discussion started by: wrapster
4 Replies

9. Shell Programming and Scripting

Logon profile kill script only partially working

I have been having an issue with the new motorola rf scan guns opening up too many sessions at once. It seems they will open a new connection for no reason, leaving the old one in the background and the user has no idea it is happening. To combat this, I have added the following code to the logon... (1 Reply)
Discussion started by: raidzero
1 Replies

10. UNIX for Dummies Questions & Answers

differnce between working of at and crontab commands

h I would like to know the differnce (both working and how) between at command and crontab.. Thanks in advance Satish D (2 Replies)
Discussion started by: doddas
2 Replies
Login or Register to Ask a Question