LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   not sure what to call it (https://www.linuxquestions.org/questions/linux-newbie-8/not-sure-what-to-call-it-344185/)

Solvaut 07-18-2005 02:20 AM

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?

0pal_t0ad 07-18-2005 02:30 AM

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

tredegar 07-18-2005 02:31 AM

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

Solvaut 07-18-2005 02:40 AM

where would I find this bash file at? In root

Cd /root/ would it be in their or would it be at?

tredegar 07-18-2005 02:48 AM

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 "."!

Solvaut 07-18-2005 02:50 AM

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

0pal_t0ad 07-18-2005 02:55 AM

redhat/fedora is linux. and in your case you need to look at /root/.bash_history

tredegar 07-18-2005 02:57 AM

ls -l will not show you "hidden" files.
ls -a will.

Solvaut 07-18-2005 03:05 AM

[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?

tredegar 07-18-2005 03:08 AM

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?

Solvaut 07-18-2005 03:12 AM

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

Solvaut 07-18-2005 03:16 AM

:cry: thanks guys :p it alls works

tredegar 07-18-2005 03:22 AM

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!


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