1751805 Members
5295 Online
108781 Solutions
New Discussion юеВ

Some comand qns

 
SOLVED
Go to solution
Avery_1
Advisor

Some comand qns

1.How does one specify that some script is to be executed without creating a new subshell?

2.How does one ensure that a command uses only a certain amt of resources when it is executed?

3.How does one insulate a variable from any characters that may follow it?

4.How does one kill a process unconditionally?

5.What command can one use to prevent a file from being removed?
hey
3 REPLIES 3
Solution

Re: Some comand qns

Hi Sophia,

I can answer 1, 3 and 4

1. either # . ./<script_name>
or
# exec ./<script_name>

3. use the following syntax for a variable:

${VARIABLE}

e.g. to echo the date into a file in your home directory:

# date > ${HOME}/date_file

4. use: kill -9

Cheers,

Trystan.
Avery_1
Advisor

Re: Some comand qns

ooo...u've been doin ur hw qn?

thanks....
hey
U.SivaKumar_2
Honored Contributor

Re: Some comand qns

Hi,

2. A programmer of a code can determine the amount of memory resources code can use. The CPU load exerted by the process is determined by the amount data fed to the process for manipulation or the speed of I/O operations or number of users connecting to that process ( network process ).

4. chattr +i myfile

Now even root cannot delete myfile. unless he gives this command and tries rm again

chattr -i myfile

regards,
U.SivaKumar



Innovations are made when conventions are broken