LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-09-2002, 10:39 AM   #1
Kage
Member
 
Registered: Jan 2002
Distribution: Redhat 9.0
Posts: 54

Rep: Reputation: 15
Disabling console commands?


Anybody know how to disable the feature in linux that keeps track of all the commands youve typed? I really want to just empty it and start over again but I figure theyll come a time when I dont want it on so I better learn everything I can about controlling this.
 
Old 02-09-2002, 10:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
well, the commands are kept in ~/.bash_history, so you can just delete that to start from new. i can't see a nice way to stop it loggin permanently, but you should be able to add a line (rm ~/.bash_history) to /etc/bashrc to erase the previous login's history upon starting new shell. this should be ok, as the file doesn't get written to untioli the shell is existed. you could also create a ~/.bash_history file in each user directory owned by root, and not writable by others, so the data couldn't be saved. but i'm not sure they are really that competent a solution, they would do the trick tho
 
Old 02-09-2002, 12:06 PM   #3
isajera
Senior Member
 
Registered: Jun 2001
Location: San Antonio, TX
Distribution: distro? what's a distro?
Posts: 1,635

Rep: Reputation: 45
hmmm... that's a feature that's going to be on pretty much every shell... most people consider it to be insanely useful. the only thing i could think of would be to set the env variable HISTORY to zero.

in your .login, put this line:

HISTORY=0
export HISTORY


i think that will work. if you get any errors, post back here.
 
Old 02-09-2002, 12:17 PM   #4
Malicious
Member
 
Registered: Jan 2002
Location: Galveston Island
Distribution: suse, redhat
Posts: 208

Rep: Reputation: 30
If you are using bash, you can do one of two things.

export HISTFILE=/xxx/xxx where /xxx/xxx is unwritable by the login user. The file won't be created.

unset HISTFILE - the file will still be created (as a temporary file) and will be deleted when the shell exits.

See man bash and search for HISTORY.
 
Old 02-09-2002, 12:38 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
do the shabby thing

bleurgh, i quit...

for a minute or so. i meant to see if somethign like that was there but i forgot...

ah i love exposing myself as a dumbass!
 
  


Reply


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
console commands as script? rooman Linux - Newbie 14 02-02-2006 07:49 PM
Console (terminal) Commands ? sonsuzuncu Linux - Newbie 3 10-27-2005 06:31 PM
Disabling commands raptorman Debian 5 09-20-2005 06:57 AM
more access?///console commands chiatello Linux - General 6 07-13-2003 02:46 PM
Console Commands. Madmanator Linux - General 1 01-24-2002 02:10 PM


All times are GMT -5. The time now is 07:58 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