LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-04-2005, 11:44 PM   #1
suguname
Member
 
Registered: Jan 2005
Location: chennai
Distribution: mandrake
Posts: 70

Rep: Reputation: 15
Unhappy history clear command


Hi,
i am using mandrake 10.0. and KDE.

i need to know the command used for clear the history.
every time i am going to remove a file .BASH_HISTORY having history.....
some stupid users seeing my history (what he done earlier)

so i need the command to clear a shell history....

thanks...
 
Old 03-05-2005, 12:04 AM   #2
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
If you have root access you can set the permissions to that other users can't even SEE what's in your file.
 
Old 03-05-2005, 12:26 AM   #3
suguname
Member
 
Registered: Jan 2005
Location: chennai
Distribution: mandrake
Posts: 70

Original Poster
Rep: Reputation: 15
this is OK..but
is there any command for clear history...

because i have two users(staff,student)
12 students using the one "students" user...

i can n ot make user for each student..
so let me know the command...

thanks...
 
Old 03-05-2005, 02:01 AM   #4
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
The complication is that KDE has its own history file, as does Firefox, etc.
So it's actually easier to just create a script that will delete them at logout.

In Konqueror it's:
/home/USER/.kde/share/apps/konqueror/konq_history

That's for the Internet history...

to remove a file you use the rm command;
rm filename

For proper syntax use;
man rm

Last edited by JaseP; 03-05-2005 at 02:04 AM.
 
Old 03-05-2005, 02:19 AM   #5
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Quote:
Originally posted by suguname
this is OK..but
is there any command for clear history...

because i have two users(staff,student)
12 students using the one "students" user...

i can n ot make user for each student..
so let me know the command...

thanks...
Is there any compelling reason all these students are sharing the same account? This is a classic recipie for disaster waiting to happen. And it also removes a lot of the advantages *nix offers multiple users.

If they are all working on the same project... (and need to edit the same files) it might be better to change the default umask to 002 (which will let every file created be r/w accessible by all members of the group), add all the students into one group, and have a softlink in their home directory to the project files (ln -s /actual/location/of/project/ ~/project).

Give appropriate permissions for user specific files (not group writable) and each user will be restrained from trampling each other's person stuff unless it is project specific. At least those files which aren't created after you change the umask. And you have some accountability because you know who was logged in and when... and you won't need to guess by time of day should something happen. Note: In this case, I would set the home directory of each user as rwx------ to prevent the other students from getting a directory listing because most new files are going to be created with permission for them to write to and will remain that way unless the student knows enough to chmod the file.

Just a little thing to keep in mind. A single account used by a group is just asking for problems.

Last edited by frob23; 03-05-2005 at 02:22 AM.
 
Old 03-05-2005, 09:32 AM   #6
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
rm .bash_history

or

history -c

Last edited by /bin/bash; 03-09-2005 at 08:08 AM.
 
  


Reply



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
clear history "last" command nistelrooy Linux - Newbie 10 11-03-2010 12:09 PM
How do I clear history in Linux ibrahimt Linux - Security 8 07-14-2009 02:15 AM
How do I clear the Dictionary's history? PionexUser Linux - Software 4 11-03-2003 03:18 AM
How does one clear Konqueror's history? forand Linux - Software 9 10-10-2003 01:11 AM
Clear History Mystified Linux - Newbie 1 03-25-2002 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:02 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration