Sponsored Content
Full Discussion: Finding whoami
Top Forums Shell Programming and Scripting Finding whoami Post 302315612 by chun02160 on Tuesday 12th of May 2009 11:36:56 PM
Old 05-13-2009
Finding whoami

Hello
I have a question about shell programming
So I recently found out that someone is secretly accessing my files due to my mistake. Of course, now, I changed all the permission so people cannot access my file(s) anymore.
However, I am a little bit mad about the fact and I'd like to find that person
So I was thinking about making simple shell script that does
whoami command and record the output to a file in my folder
So whenever user cd my folder, say "test" folder, then the shell script runs automatically and do "whoami", record the result into a file and save it in my "test" folder
I am wondering if this is possible to do? If so, then could you tell me how?
Also is there other ways I can find the user (who is accessing my file) better way?

By the way, I am using school server so I don't have permission to install or use administrator folders.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding how done IT

HellOooO, How I can find how delete a drictory in the system.If there's 2 root one of them outside the country but we have WAN so he can access the network from outside >>>> we are using same account so how I can know who done it I want to proof that. Regards (5 Replies)
Discussion started by: geoquest
5 Replies

2. Shell Programming and Scripting

Finding max value

My code below is supposed to find which company had the most business and then print the appropriate fields from another file which are the companies ID number and name. I can loop through awk and display all the total amount of business for each company but I need help in only printing out the... (1 Reply)
Discussion started by: Enigma23
1 Replies

3. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies

4. UNIX for Dummies Questions & Answers

The "Whoami" command

Ladies, Gents, I am fairly new to this game but I am having trouble making the above command work. If I login as root and go to terminal session "whoami" works. If I login as admin open a terminal session and "su root" the "whoami" command comes up with " Not recognised". Any ideas? ... (1 Reply)
Discussion started by: John Dobson
1 Replies

5. Shell Programming and Scripting

whoami export

how can I use whoami on a script for ordinary user? it always says command not found. pls help #!/bin/ksh W='whoami' DATE=`date "+%Y-%m-%d %H:%M:%S"` echo " $DATE- by $W" result 2011-03-29 09:46:16 - by you wil noticed the by is blank...pls help..but in root, it works (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. OS X (Apple)

sudo chown -R `whoami` /usr/local

I was following a tutorial on installing Homebrew and I changed the ownership of /usr/local/ to me. Now McAfee Security won't start This is the exact line I typed: sudo chown -R `whoami` /usr/local Then I tried to fix it with: sudo chown -R root /usr/local I still can't start mcafee. It say... (7 Replies)
Discussion started by: chancho
7 Replies

7. Shell Programming and Scripting

Finding my public IP

Hi I do use this line to find my public IP. Is there other way I can do this? Maybe create the script some shorter? wget -q -O - http://minip.no | grep "<b>" | head -n1 | cut -d'<' -f3 | cut -d'>' -f2 Thanks (1 Reply)
Discussion started by: Jotne
1 Replies

8. Shell Programming and Scripting

finding first >

I want to erase some php code between a <? and a ?> in HTML containing a keyword, the problem is it finds the last > and wipes out everything before it how do i specify for it to stop searching after the first >? perl -i -p0e 's/<\?php.*keyword.*\?>//s' there's many lines of php code... (2 Replies)
Discussion started by: vanessafan99
2 Replies

9. UNIX for Dummies Questions & Answers

Whoami error

when I type whoami i get an error saying ksh not found.. how do I exit from ksh script and make it work .. (2 Replies)
Discussion started by: lakers646
2 Replies

10. AIX

Capture whoami log on a specific command

// AIX 6.1 TL8 Please advise on how to capture whoami log or the user and time info into a log file (i.e. /tmp/cmdcapture.log) whenever users are executing a certain command(s) so that I can keep the single log history (for all users) of who did what. The command(s) I need to monitor are a... (3 Replies)
Discussion started by: Daniel Gate
3 Replies
RMF(1)								     [nmh-1.5]								    RMF(1)

NAME
rmf - remove an nmh folder SYNOPSIS
rmf [+folder] [-interactive | -nointeractive] [-version] [-help] DESCRIPTION
Rmf removes all of the messages (files) within the specified (or default) folder, and then removes the folder (directory) itself. If there are any files within the folder which are not a part of nmh, they will not be removed, and an error will be produced. If the folder is given explicitly or the -nointeractive option is given, then the folder will be removed without confirmation. Otherwise, the user will be asked for confirmation. If rmf can't find the current folder, for some reason, the folder to be removed defaults to `+inbox' (unless overridden by user's profile entry "Inbox") with confirmation. If the folder being removed is a subfolder, the parent folder will become the new current folder, and rmf will produce a message telling the user this has happened. This provides an easy mechanism for selecting a set of messages, operating on the list, then removing the list and returning to the current folder from which the list was extracted. If rmf s used on a read-only folder, it will delete all the (private) sequences (i.e., "atr-seq-folder" entries) for this folder from your context without affecting the folder itself. Rmf irreversibly deletes messages that don't have other links, so use it with caution. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder Inbox: To find the default inbox SEE ALSO
rmm(1) DEFAULTS
`+folder' defaults to the current folder, usually with confirmation `-interactive' if +folder' not given, `-nointeractive' otherwise CONTEXT
Rmf will set the current folder to the parent folder if a subfolder is removed; or if the current folder is removed, it will make "inbox" current. Otherwise, it doesn't change the current folder or message. BUGS
Although intuitively one would suspect that rmf works recursively, it does not. Hence if you have a sub-folder within a folder, in order to rmf the parent, you must first rmf each of the children. MH.6.8 11 June 2012 RMF(1)
All times are GMT -4. The time now is 12:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy