Timestamp with search result
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I know that I can search history with CtrlR. Also I can
see timestamps like this:
HISTTIMEFORMAT='%x %r '
then running the "history" command. However I would like to combine the two. I
would like to search using one of these or similar:
CtrlRhistory
fc
grep
less
but the result(s) should have the timestamp prepended. Is such a thing possible?
bash shell command-history timestamps
add a comment |Â
up vote
0
down vote
favorite
I know that I can search history with CtrlR. Also I can
see timestamps like this:
HISTTIMEFORMAT='%x %r '
then running the "history" command. However I would like to combine the two. I
would like to search using one of these or similar:
CtrlRhistory
fc
grep
less
but the result(s) should have the timestamp prepended. Is such a thing possible?
bash shell command-history timestamps
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I know that I can search history with CtrlR. Also I can
see timestamps like this:
HISTTIMEFORMAT='%x %r '
then running the "history" command. However I would like to combine the two. I
would like to search using one of these or similar:
CtrlRhistory
fc
grep
less
but the result(s) should have the timestamp prepended. Is such a thing possible?
bash shell command-history timestamps
I know that I can search history with CtrlR. Also I can
see timestamps like this:
HISTTIMEFORMAT='%x %r '
then running the "history" command. However I would like to combine the two. I
would like to search using one of these or similar:
CtrlRhistory
fc
grep
less
but the result(s) should have the timestamp prepended. Is such a thing possible?
bash shell command-history timestamps
asked Dec 23 '17 at 18:50
Steven Penny
2,30821635
2,30821635
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
This seems to work:
history | grep pattern
I also added this to my "~/.profile":
alias ahist='history | grep -i --color'
HISTIGNORE='ahist *'
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
This seems to work:
history | grep pattern
I also added this to my "~/.profile":
alias ahist='history | grep -i --color'
HISTIGNORE='ahist *'
add a comment |Â
up vote
0
down vote
accepted
This seems to work:
history | grep pattern
I also added this to my "~/.profile":
alias ahist='history | grep -i --color'
HISTIGNORE='ahist *'
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
This seems to work:
history | grep pattern
I also added this to my "~/.profile":
alias ahist='history | grep -i --color'
HISTIGNORE='ahist *'
This seems to work:
history | grep pattern
I also added this to my "~/.profile":
alias ahist='history | grep -i --color'
HISTIGNORE='ahist *'
edited Dec 27 '17 at 2:26
answered Dec 26 '17 at 16:35
Steven Penny
2,30821635
2,30821635
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412709%2ftimestamp-with-search-result%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password