- Forums
- Linux Systems
- Save Linux Shell Session Record Output Of Command History
This Page Contains information about Save Linux Shell Session Record Output Of Command History By wallpaperama in category Linux Systems with 0 Replies. [2975], Last Updated: Sat May 18, 2024
wallpaperama
Thu Jul 19, 2007
0 Comments
1928 Visits
sometimes when you want to anaylise the output of a command its hard because there's alot of information being displayed on your screen when you execute a command in the unix shell.
i find that its easier if i just make a file of the history.
with linux you can start to record every command you send and all the response you get with the script command. lets say for example in this tutorial guide, i want to display or show on my screen which are the devices on my system. well the command to do that is:
ls /dev/ -la
once i execute this command, it gives me a long list
so to capture all that output into a text file i can do these steps:
1. change directory to you home directory where the history file is going to be saved
cd ~
2. make file: send command to start recording and saving the output into output.txt
script output.txt
3. now save the command to display your devices:
ls /dev/ -la
4. exit to stop making records in file:
exit
5. now the output is saved in output.txt and you can view the file:
OPTION 1:
cat output.txt
OPTION 2: open file with nano editor
nano output.txt
OPTION 3: open file with vi editor
vi output.txt
that's it
if you ever need dedicated or shared hosting, visit www.webune.com they have great service, they were the ones who helped me with this problem.
hope this helps