bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: history -f filename


From: microsuxxor
Subject: Re: history -f filename
Date: Mon, 2 Dec 2024 21:30:29 +0100

On Sat, Nov 30, 2024, 2:05 AM Dan Jacobson <jidanni@jidanni.org> wrote:

> $ history
> is nice, but what if you want to have it read from a different file?
> $ help history
> says
>     If FILENAME is given, it is used as the history file.  Otherwise,
>     if HISTFILE has a value, that is used, else ~/.bash_history.
> Alas, it also says
>     history: history [-c] [-d offset] [n] or
>     history -anrw [filename] or
>     history -ps arg [arg...]
>
> So if one wants to use a filename, then one needs to use -anrw (-[anrw]).
>
> So maybe a new -f is needed:
> $ history -f filename
> to simply read from filename.
>

the hiatory file's name is in $HISTFILE
u can supply those also individually to cmds

>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]