Unix command?

Posted on 2004-03-30
Last Modified: 2013-12-23

Is there a command or settings to be done in unix that will saved all the commands to file typed at command prompt? I will need this for future reference without recreating all those commands again.

Any help would be appreciated.

Question by:marou
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

Alf666 earned 50 total points
ID: 10722582
You should find all these commands in a history file (depending on your shell).

The best is to type the following shell internal :


Bu if you want to find a file, it will be located in your home dir :

For sh : .history
For bash : .bash_history


Expert Comment

ID: 10722589
try echo $HISTFILE

It should give you the right file.

Author Comment

ID: 10724174
Many thanks Alf666.

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

726 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