Solved

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

Posted on 2004-10-12
3
279 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

821 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