Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Need to find a text file through a running process

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
nvakada
Posts: 5
Joined: 2017-11-21 10:37

Need to find a text file through a running process

#1 Post by nvakada »

Hi Guys,

I have an assignment to find a file (contains some sort of text), which was opened by one of the running process which is also not part of the reggular process that should be running in the debian server.

So, I am stuck with neither the filename nor the process which has opened it.

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Need to find a text file through a running process

#2 Post by arochester »

We do not do homework/assignments for people.

Your problem is hypothetical rather than practical. It is so you can learn, not ask.

We might help if you explain exactly what you have done.

nvakada
Posts: 5
Joined: 2017-11-21 10:37

Re: Need to find a text file through a running process

#3 Post by nvakada »

understood..

I tried listing the current running process by ps -ef. I am not sure about the default running processes that should be running so I am having hard time segregating that.

I did try out lsof -p PID for few of them which I thought would be odd man outs..

Clearly I am kind of stuck here with this scenario.

any pointers for the default processes that should be running as part of the new server setup.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Need to find a text file through a running process

#4 Post by debiman »

i don't really understand the question either.
what's "one of the running process which is also not part of the reggular process that should be running in the debian server" supposed to mean?
was this originally written in english, or did google.translate mangle it?

fwiw, lsof and ps are the commands that first popped into my mind, too.

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Need to find a text file through a running process

#5 Post by pendrachken »

This is a pretty standard multi part question. Break it down into steps to solve, and it actually becomes pretty easy.


I will only give you the first question you can ask yourself to start solving the whole chain:

1: How do I find out what is in a standard Debian install.
2:?????
3:?????


Once this is done, you will look back and think it was sooo much easier than when you first started looking at as a whole problem ( and this is WHY they teach CS this way).
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

nvakada
Posts: 5
Joined: 2017-11-21 10:37

Re: Need to find a text file through a running process

#6 Post by nvakada »

This is part of a test

actual question below (like RHCE exam)

After you successfully upload your public key, please access the server by ssh on port 22022 as user "test". This user has sudo rights.
Once you are logged into the server, you should search for a running process that shouldn't be there and check the files opened by it: you will find the list of tasks to be accomplished hidden in one of them!

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Need to find a text file through a running process

#7 Post by Wheelerof4te »

We don't solve people's exams here. This forum is for technical help and discussions about Debian. Among users.
Last edited by Wheelerof4te on 2017-11-21 20:26, edited 1 time in total.

nvakada
Posts: 5
Joined: 2017-11-21 10:37

Re: Need to find a text file through a running process

#8 Post by nvakada »

pendrachken wrote:This is a pretty standard multi part question. Break it down into steps to solve, and it actually becomes pretty easy.


I will only give you the first question you can ask yourself to start solving the whole chain:

1: How do I find out what is in a standard Debian install.
2:?????
3:?????


Once this is done, you will look back and think it was sooo much easier than when you first started looking at as a whole problem ( and this is WHY they teach CS this way).
How do I find out what is in a standard Debian install. - This would suffice.. any installation guide that I could look into..

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Need to find a text file through a running process

#9 Post by GarryRicketson »

Read some of the documentation at www.debian.org
Don't your school teachers teach you how to do a simple search ?
How do I find out what is in a standard Debian install.

2 of many hits:
https://wiki.debian.org/tasksel
https://www.debian.org/releases/stable/installmanual

nvakada
Posts: 5
Joined: 2017-11-21 10:37

Re: Need to find a text file through a running process

#10 Post by nvakada »

GarryRicketson wrote:Read some of the documentation at http://www.debian.org
Don't your school teachers teach you how to do a simple search ?
How do I find out what is in a standard Debian install.

2 of many hits:
https://wiki.debian.org/tasksel
https://www.debian.org/releases/stable/installmanual

Just gone through "http://www.catb.org/esr/faqs/smart-questions.html"

I've done a huge mistake by posting this question. Lesson learnt.. :(

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Need to find a text file through a running process

#11 Post by debiman »

nvakada wrote:Just gone through "http://www.catb.org/esr/faqs/smart-questions.html"
I've done a huge mistake by posting this question. Lesson learnt.. :(
well, good that you read it, but "huge mistake" is a little over the top.
:mrgreen:
nvakada wrote:Once you are logged into the server, you should search for a running process that shouldn't be there
i think this is not meant literally, but more as a suggestion:
have a look at the processes running, find one that looks suspicious.
you can use the 'top' command for that.
you could install another debian server in a vm to see what should be there, but my guess is it will just pop out at you.

PS: "Running process" is another important hint

User avatar
makh
Posts: 651
Joined: 2011-10-09 09:16

Re: Need to find a text file through a running process

#12 Post by makh »

nvakada wrote:... Once you are logged into the server, you should search for a running process that shouldn't be there ....and check the files opened by it: you will find the list of tasks to be accomplished hidden in one of them!
After login to server:
1. You need to find an additional process. (hint: it was not supposed to be running)
2. Once you do that... then only:
2a. check the files opened by it.
2b. you will find the list of tasks to be accomplished hidden in one of them.

Hope you solve it OR you may post the login to the Server :roll: ... :arrow:
ThinkPad E14: Arch, Debian Stable
GUI: Xfce

For new: Try MX Linux, Linux Mint; later join Debian Stable

Post Reply