LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-20-2010, 12:28 AM   #1
kkracdba
LQ Newbie
 
Registered: Jun 2010
Posts: 1

Rep: Reputation: 0
Question how to save command history in Linux


hi all,
i have Q ?
how to save command out put to another file.

Ex: #ps -ef
that particular cmd output i need to save another file.
is it possible ...if possible ..please let me know
And how to save command history in Linux.
 
Old 06-20-2010, 03:40 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,017
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
Quote:
Originally Posted by kkracdba View Post
how to save command out put to another file.
Use 'ps -ef > /path/filename': see http://www.gnu.org/software/bash/man...irections.html and http://tldp.org/LDP/abs/html/io-redirection.html


Quote:
Originally Posted by kkracdba View Post
And how to save command history in Linux.
In BaSH history is saved automagically to your ~/.bash_history (default location) when your shell session ends so there is nothing you have to do. (Also see 'man bash' for 'shopt -s histappend' and 'history -a'.)
 
  


Reply

Tags
command, history, how, linux, save


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
tcsh: can you save the history from multiple shells to one history file? BrianK General 2 04-23-2009 05:19 AM
Save history command in another file jsantosh_d Linux - Newbie 3 10-29-2008 02:01 AM
LXer: Linux to help the Library of Congress save American history LXer Syndicated Linux News 0 03-29-2007 09:01 AM
Where does KDE's run command save history? ljubak Linux - Desktop 1 08-28-2006 04:21 PM


All times are GMT -5. The time now is 11:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration