Save Linux Shell Session Record Output Of Command History

Mobile
feeds
Welcome Login | Register

Save Linux Shell Session Record Output Of Command History
  Forums Index
      » Linux Forums
        » » Save Linux Shell Session Record Output of Command History



Save Linux Shell Session Record Output Of Command History
Post Description:
Post Tags: save, linux, shell, session, record, output, of, command, history, linux, linux support, linux questions, linux server, programming, assistance, questions, answers, tech, it, unix
This Post Has Been Viewed 438 Times Since Thu Jul 19, 2007 9:45 am Posted By hostman with 0 replies
Save Linux Shell Session Record Output Of Command History
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




Leave Your Comments






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About Save Linux Shell Session Record Output Of Command History




(0) Comments