LinuxQuestions.org
Visit Jeremy's Blog.
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 07-18-2005, 03:20 AM   #1
Solvaut
LQ Newbie
 
Registered: Jul 2005
Posts: 15

Rep: Reputation: 0
not sure what to call it


hi i have a linux server and when i login i push up and than it shows all of the commands i typed under root... theres a long list is there can be a way where i can clear the list?
 
Old 07-18-2005, 03:30 AM   #2
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Rep: Reputation: 30
not sure, but it's probably saved in your home dir as a hidden file. try doing a search for files containing the text that's remembered
 
Old 07-18-2005, 03:31 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
It is your bash history.

Quote:
theres a long list is there can be a way where i can clear the list?
Delete the file ~/.bash_history

Either do this in a terminal, or to see the file in konqueror, you may have to do view -> Show hidden files
 
Old 07-18-2005, 03:40 AM   #4
Solvaut
LQ Newbie
 
Registered: Jul 2005
Posts: 15

Original Poster
Rep: Reputation: 0
where would I find this bash file at? In root

Cd /root/ would it be in their or would it be at?
 
Old 07-18-2005, 03:48 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Delete the file ~/.bash_history
The ~ means your home location, it is probably something like /home/yourusername.
So either of the following will work in a terminal:

rm ~/.bash_history
rm /home/yourusername/.bash_history

Edit: I missed out a "."!

Last edited by tredegar; 07-18-2005 at 03:49 AM.
 
Old 07-18-2005, 03:50 AM   #6
Solvaut
LQ Newbie
 
Registered: Jul 2005
Posts: 15

Original Poster
Rep: Reputation: 0
This sounds kind of like linux, I have Fedora Core 3.
Their is nothing inside of the home folder that i am go to

cd /home/

I then type

ls -l

nothing in their

So I belive your refering to the root folder as Im logged in as root through ssh, your help is appreciated
 
Old 07-18-2005, 03:55 AM   #7
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Rep: Reputation: 30
redhat/fedora is linux. and in your case you need to look at /root/.bash_history
 
Old 07-18-2005, 03:57 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
ls -l will not show you "hidden" files.
ls -a will.
 
Old 07-18-2005, 04:05 AM   #9
Solvaut
LQ Newbie
 
Registered: Jul 2005
Posts: 15

Original Poster
Rep: Reputation: 0
[root@dedicated7 ~]# rm ~/.bash_history
rm: remove regular file `/root/.bash_history'? y

i have am to type that and what do i type else? i push y for yes than do i re log in with ssh?
 
Old 07-18-2005, 04:08 AM   #10
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
You answer Y , press return, and that's it, the file is gone forever.
May I ask why you are logged in as root over ssh, and wish to delete the history file? You are not doing something BAD are you?
 
Old 07-18-2005, 04:12 AM   #11
Solvaut
LQ Newbie
 
Registered: Jul 2005
Posts: 15

Original Poster
Rep: Reputation: 0
No am want to start off clean it that is full when I push up! An when I type ps -x it says someone else is loged in my server and than i want to see what kinds of commands they enter in


31120 ? Ss 0:00 sshd: root@matty

i do not know matty?? but that what i want to see how kinds of commands he or she enters
 
Old 07-18-2005, 04:16 AM   #12
Solvaut
LQ Newbie
 
Registered: Jul 2005
Posts: 15

Original Poster
Rep: Reputation: 0
thanks guys it alls works
 
Old 07-18-2005, 04:22 AM   #13
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
If you think someone has loogen into your server as root, you should:

NOT delete the file /root/.bash_history!
You should know that commands like ps & who may be "lying" to you, as they have been changed.
You should take the server offline at once .
You should do a clean re-install from CD/DVD
You should choose a SECURE root password.
You should pay attention to all the security updates for your distro.
You should read the Security forum on this board.

I fear you may be in big trouble. Good luck!
 
  


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
What should i call my distro? BBB General 36 01-23-2005 08:37 AM
What do you call your remote control? I call mine... RHLinuxGUY General 19 10-18-2004 07:23 AM
alarm() call socket9001 Programming 3 04-26-2004 04:03 PM
Call to arms! Nimoy LQ Suggestions & Feedback 4 10-12-2003 03:29 PM
where and how to call xscreensaver? sancho5 Linux - General 4 09-05-2002 12:06 PM


All times are GMT -5. The time now is 03:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration