- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Finding the ip from where the commands are fir...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2010 11:25 PM
тАО02-28-2010 11:25 PM
I would like to know in linux how to find out the terminal from where the commands are fired and if possible the IP address of the machine where the terminal is opened.
This is required as continuous deletion of my project folders and files are happening though we have separate userid and password for the project.
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2010 11:56 PM
тАО02-28-2010 11:56 PM
Re: Finding the ip from where the commands are fired
Any crontab entries to delete "old" files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2010 12:24 AM
тАО03-01-2010 12:24 AM
Re: Finding the ip from where the commands are fired
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2010 06:12 AM
тАО03-01-2010 06:12 AM
Re: Finding the ip from where the commands are fired
have you tried last(1)?
It list all that info.
rgds
HGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2010 12:29 AM
тАО03-02-2010 12:29 AM
Re: Finding the ip from where the commands are fired
last command gives the output as follows
nish pts/7 10.66.123.221 Tue Mar 2 13:45 still logged in
I require the command fired from this particular terminal along with IP.Can u please suggest?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2010 01:06 AM
тАО03-02-2010 01:06 AM
Solutionhave a look at your shell-history ( e.g. ~/sh_history, ~/.bash_history etc) or if no history is configured have a look at sh(1), bash(1) or csh(1) etc. to configure one.
e.g. add lines like this to /home/nish/.bashrc:
export HISTFILE=~/.bash_history_$(basename $(tty) )
export HISTTIMEFORMAT='%F %T '
The you can audit all commands invoked.
rgds
HGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2010 02:18 AM
тАО03-02-2010 02:18 AM
Re: Finding the ip from where the commands are fired
After exporting these variables in the home directory .sh_history file got formed instead of a file like .bash_history_7.Can you pls explain on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2010 02:47 AM
тАО03-02-2010 02:47 AM
Re: Finding the ip from where the commands are fired
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2010 02:53 AM
тАО03-02-2010 02:53 AM
Re: Finding the ip from where the commands are fired
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2010 03:05 AM
тАО03-02-2010 03:05 AM
Re: Finding the ip from where the commands are fired
the HISTFILE variable in this form distingishes between the tty's and makes it possible to relate it to IP-Address via last-output.
rgds
HGH