Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Info Linux Command History - Finding that oneLiner

peezy

Extended Member
Ext. Member
Joined
Oct 2, 2019
Messages
56
Reaction score
256
Points
64
Location
The Woods
Have you ever needed that command that took you 3 hours of dorking and a couple beers to find, but the thought of how to re-find it left your brain? This may be a total noob thing but when you hit the up arrow on the command line to look through past statements, it's a bit hard to sift through to find the one your looking for. Well I had no idea until I tried looking that those commands are stored somewhere....duh....they r brought up as history so they have to be stored somewhere.

You can find them for user other than root in

/home/myuser/.bash_history

If you are root

/root/.bash_history

Some flavors have the file as just .history, if you have trouble locating it, try

echo $HISTFILE

Just nano or vim that mofo

There are some other commands you can enter to add a date time stamp to your history file along with the command you entered, or even change how many commands are stored in the file. Once the file hits the limit of commands it starts overwriting itself, so hopefully you open it in time.

Hope this helps someone out there.

Here is the link for more information and how to add date/time stamp, etc.

 
Last edited:
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top