Solved

Trying to repeat a command (for example, r ls)

Posted on 2004-10-12
3
278 Views
Last Modified: 2006-11-17
When I type
ls -lt

I get my desired results, but when I try to repeat

r ls

I get this error message

ksh: ls:  not found
0
Comment
Question by:booksplus
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
tfewster earned 50 total points
ID: 12296599
Does any command history work?  e.g. Esc K to recall the previous command?

Does $HOME/.sh_history exist, and is it being updated each time you use a command?

Does `set |grep HIST` indicate your history file is somewhere other than $HOME/.sh_history ? And if so, do you have write permission on that file?
0
 
LVL 20

Expert Comment

by:tfewster
ID: 12300779
Thank you - But what _was_ the problem in the end?
0
 

Author Comment

by:booksplus
ID: 12301083
The problem was that the .sh_history did not exist.  AND HISTFILE = /dev/null.  So I set HISTFILE=$HOME/.sh_history
and touched .sh_history.  Works now.  Thanks.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now