- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Login test thru script.
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
Forums
Discussions
Discussions
Discussions
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
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
07-31-2002 10:21 AM
07-31-2002 10:21 AM
I have the following script thru which i find what are the files which are being accessed/written to before a login program.
touch fileA
sleep 15
touch fileB
find / -newera fileA -a ! -newera fileB
But when i run this script against a login $HOME/.profile is not shown. It is obvious that the user's .profile is accessed uopn a login is it not? or am i missing something. The idea is to have a list of all the files that were either read,referenced,written or executed before login. Can someone help?
Thanks
Brian.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 10:27 AM
07-31-2002 10:27 AM
Re: Login test thru script.
Only the files which are CREATED/MODIFIED within that period should show up. As for .profile, it is read only as login. Therefore, its timestamp is unchanged, resulting that it is not shown by the find command.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 12:13 PM
07-31-2002 12:13 PM
Re: Login test thru script.
I found that if I added
-name "*" -type f
to the find command it would work.
eg:
find / -name "*" -type f -newera fileA -a ! -newera fileB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2002 09:44 AM
08-01-2002 09:44 AM
Re: Login test thru script.
It still does not show .profile. It shows /etc/profile but not .profile.
Thanks
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2002 09:53 AM
08-01-2002 09:53 AM
Re: Login test thru script.
Is this user's default shell POSIX ? If not, then the profile file will be different. Check .login abd .cshrc files if it's cshell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2002 10:03 AM
08-01-2002 10:03 AM
Re: Login test thru script.
# man find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2002 11:57 AM
08-01-2002 11:57 AM
Re: Login test thru script.
newera option should show the accessed file.
Thanks
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2002 12:40 PM
08-01-2002 12:40 PM
SolutionFor user root with default shell /sbin/sh.
# touch a
# term ## which starts a new session
Starting terminal window on host (TERM=hpterm) ...
# touch b
# find . -name "*" -newera a -a ! -newera b
./.profile
./b
Now for user with /usr/bin/csh default shell.
# touch a
# term ## which starts a new session
Starting terminal window on host (TERM=hpterm) ...
# touch b
# find . -name "*" -newera a -a ! -newera b
./.cshrc
./b
./.kshrc
./.login
I am running HP-UX 11.0
Rich