37
votes
10answers
2k views

What does an operating system look like without a shell?

A shell like the bash or command.com (up to Windows ME) or CMD.EXE (in later versions) provides an interface that (among other things) accepts commands from the user. What does an operating system ...
0
votes
1answer
243 views

How can I both use and modify the history inside a bash script?

So I have the following bash script aliased as "fortunes": #!/bin/bash -i REPLY=; history -w /tmp/fortunes_history_backup; # save history ... history -c; # and clear it. while [ ! \( "$REPLY" = "q" ...
0
votes
1answer
85 views

Tcsh command history

I use tcsh and have the following in my .cshrc file. But the .history file is not updated as and when I execute a command. Is there anyway so that .history file is updated every time I execute a ...
0
votes
0answers
11 views

Bash history lost [duplicate]

My bash history in cygwin is lost between two consecutive shells. Here are the outputs of some commands that might help to understand the issue: set -o | grep history history on $ grep -i ...
2
votes
2answers
110 views

How to look at the past directory history the shell was in?

Sometimes I like to look back in the command history to figure out what I was doing. Sometimes it would help to know what the cwd was for each command. So, I'm wondering if there's some way to track ...
5
votes
4answers
1k views

BASH history truncated to 500 lines on each login

For some reason, I cannot get my system to keep my BASH history after a reboot. Here are the relevant sections of my ~/.bashrc: shopt -s histappend PROMPT_COMMAND='history -a; updateWindowTitle' ...
5
votes
1answer
9k views

Retrieve Linux command line history by date

I want to see what I typed on my bash command line on a certain day a week ago. Is there a way to retrieve command line history? Something like below, perhaps? > history --include-date | grep ...
8
votes
8answers
636 views

Per-directory bash/zsh history log files

I find I do a lot of work on a project in a set directory. Sometimes — a few months down the track — I need to redo something on that project but I can't remember what I did. I use ...
1
vote
1answer
764 views

How to get down-arrow history browsing in bash in Mac OS X Terminal?

On almost all modern command-line environments I've used, you can hit up arrow to go back a few commands in your history and re-run an earlier command. But on some command-line environments I've ...
3
votes
2answers
1k views

Sometimes my .bash_history gets cleared. Why? How can I prevent that?

Here's my shell: $ $SHELL --version | head -1 GNU bash, version 4.1.7(2)-release (i386-apple-darwin10.3.0) Here are my history related settings: export HISTCONTROL=ignoredups:erasedups export ...
4
votes
1answer
365 views

bash command history update before execution of command

Bash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT. However, I'm wondering if there is a way to log the commands to a file as soon as ...
3
votes
1answer
3k views

Selectively delete entries from Windows 7 autocomplete history dropdown box

Random question, and I'm sure it has a very simple answer, if not already asked and answered in some shape or form. How do you selectively delete entries from the autocomplete history dropdown ...
36
votes
4answers
9k views

What is the origin of the UNIX $ (dollar) prompt?

The UNIX prompt uses a $ symbol to indicate that your input is expected. I was wondering why this symbol was chosen -- if there is a reason. Dollar just seems a little unexpected. A > would have been ...
1
vote
1answer
180 views

history file grows indefinitely

I believe I get the same problem as this guy. I'm on AIX, with tcsh 6.12.00 After (probably) a bad logout, the history file exponentially grown, until the quota stopped it (and when the quota was ...
2
votes
2answers
241 views

History of commands?

Is there any way to find which commands have been executed between 2 specific dates (like 2 to 3 months period)? I can use the history command, but I have powered the system on/off. Is this ...