- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- Finding the ip from where the commands are fired
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Latin America
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP