Madinat al-Muslimeen Islamic Message Board

A R C H I V E S

taking the *wrong* class

Madina Archives


Madinat al-Muslimeen Islamic Message Board

taking the *wrong* class
se7en
10/10/02 at 15:36:39
as salaamu alaykum,

guys unix sucks :(  anyone know the answers to these questions?  ???


12. Assume you are logged onto the acunix cluster and currently
are “positioned” in your home directory.  You need to augment the
amount of disk space you have available.  You’ve decided move a
large file currently located in your home directory called “too.big”
into a subdirectory called "saveforadayforme" within the Unix
temporary directory space available to all users.  Show ALL the
commands needed to accomplish this.

13. You’ve instructed user ab1234 to type the command ps –fu ab1234  to
find the login session, which they left running at home, so it can
be terminated.  When they do they receive the error message:

acunix1% ps –fu ab1234
ps: illegal option -- f
usage: ps [ -aceglnrSuUvwx ] [ -t term ] [ num ]

acunix1%

a)You immediately suspect that they are using a different ps
command than you are.  What command can you use to check what ps
command they actually are using?

b)How could you modify/change the command to work for them?


19.  Assume you had a file in your current directory
named “my.favoriteplaces” which contained the names of your
favorite vacation spots (one per line). Now assume that you typed
the following command  at the acunix% prompt:

man ps >> my.favoriteplaces
       
What would the contents of the file look like after the command
executed?


10/10/02 at 15:44:03
se7en
Re: taking the *wrong* class
jannah
10/10/02 at 16:14:59
I love UNIX!!!

13. mv toobig /tmp/saveforadayfromme/.

(assuming /tmp is that temp directory)

14. maybe do a history command?
then do a ps to find all the sessions running and do a kill -9 -1



19. it would have the contents of the man file on ps (the help file)


Re: taking the *wrong* class
theOriginal
10/10/02 at 16:51:15
[slm]

:D

bahh@mathies.

As Fascinating as UNIX is, I just don't get it!  :'(

Someday, inshaAllah, I'ma learn, and then I'll come back to answer your q's!  

In the meantime! SOMEONE HELP se7en!

Wasalaam.
SF.
Re: taking the *wrong* class
Kathy
10/10/02 at 23:30:14
;)I thought Unix had something to do with the Eygyptian era man salves....
Re: taking the *wrong* class
Kashif
10/11/02 at 09:34:47
assalaamu alaikum

13a) The command the person needs to execute is:
which ps

This will give you the path to the specific version of ps that is being used.

b)  You ask the user to put in the absolute path to the version of ps that you are using.

14. It would contain a list of your favourite locations, and beneath that the man file for the ps command.

Kashif
Wa Salaam
NS
Re: taking the *wrong* class
eleanor
10/13/02 at 07:06:22
[slm]

whoah... this reminds me of the Patricia Cornwell books - the scariest part of those books for me is when Lucy is explaining how it's "so easy" and talks about Unix and all that scary command stuff...  :o
Re: taking the *wrong* class
Abu_Hamza
10/13/02 at 19:31:03
[slm]

Funny that Jannah and Kashif's answers don't match!  

Two self acclaimed geeks can't even get basic unix right?  :P

Hehe.
Re: taking the *wrong* class
jannah
10/14/02 at 03:00:53
[wlm]

hah! shows how much these non geeks know... i'll have u know that in UNIX there are many ways to do something, that's the beauty of it see ;)

but i think kashif's answers are more correct... i never tried the which command... and i had assumed >> would overwrite a file but i guess it would append if it already exists..
10/14/02 at 03:02:27
jannah
Re: taking the *wrong* class
Al-Basha
10/16/02 at 02:04:18
[wlm]

I'll try and answer the questions as best as I can insha Allah:

12.

a) Run the following command to create a director called saveforadayforme under the "tmp" directory which is located at the top level "/" or "root" directory, not to be confused with "roots" directory.

mkdir /tmp/saveforadayforme

b) Run the following command to move the file from the home directory to the newly created directory

mv too.big /tmp/saveforadayforme

c) Run the following command to change to the direcotory just made,

cd /tmp/saveforadayforme

d) Type ls -al to get a listing of the files in the directory

e) Type chmod 700 /tmp/saveforadayforme
This will only allow your user access to the directory, also root but then again root has access to pretty much everything.


13. Bro Kashif's way definatly works, but you should also be able to just type in "ps" and get a list of processes that you are running. Take a look at the column that says time, you want to kill the process that has the longest time, because thats the one that is running idle. So what you do is type kill -9 PID where PID is the 1st column.

19.

Well by typing man ps >> my.favoriteplaces you are appending the contents of the ps manpage onto that file. If you were to type man ps > my.favorite places you would overwrite the file.

Hope that helps insha Allah.

wasalamu aliakom
Re: taking the *wrong* class
se7en
10/25/02 at 00:20:47
as salaamu alaykum,

thanks so much guys!!   :-X

can you guys help me with Part B, Step 1 of this lab?  I got the rest of it, alhamdulillah.

http://www.albany.edu/~csi198/Labs/csi198lab05.pdf

[]'s on the house for everyone who helps me :)
10/25/02 at 00:21:34
se7en
Re: taking the *wrong* class
Kashif
10/25/02 at 06:18:03
assalaamu alaikum

a) Pine has started and is running as a background process. (The Ampersand starts the job and runs it in the background).

b) fg

c) ctrl + Z, followed by bg

d) When you issued the initial command (i.e. pine &) it should have returned a number - the process ID. Type kill <process-id> (without the chevrons) to kill it. If it didn't intially return the pocess-id, then type ps which will give you a list of processes running along with their process Ids.
NS
10/25/02 at 06:19:30
Kashif
Re: taking the *wrong* class
se7en
11/07/02 at 10:03:51
as salaamu alaykum wa rahmatAllah,

jazakam Allahu khayran y'all..   [] for iftaar for all of u :)

now i'm actually in the computer labs, in training :o

make duaa for me :)
11/07/02 at 10:05:39
se7en
Re: taking the *wrong* class
jaihoon
11/09/02 at 01:19:07

UNIX  ???


Madinat al-Muslimeen Islamic Message Board
A R C H I V E S

Individual posts do not necessarily reflect the views of Jannah.org, Islam, or all Muslims. All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster and may not be used without consent of the author.
The rest © Jannah.Org