1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Murljashka [212]
3 years ago
10

Find all the files and directories in /var (including subdirectories) that are owned by user root. Send the list of full path na

mes to s8. Your find command may produce "Permission Denied" errors during this search. This will have no effect on the answer, and this error can be safely ignored for this question.
Computers and Technology
1 answer:
Dennis_Churaev [7]3 years ago
7 0

Answer:

find /var -user root > s8

Explanation:

To look for a file matching multiple conditions with find, what you do is to simply list each condition in turn. For instance, to look for a file owned by root (-user root) and writable by its owner (-perm -u+w) on the root filesystem (-xdev, meaning not to recurse underneath mount points such as /proc and /sys) and called hello:

find / -xdev -user root -perm -u+w -name hello

If you're looking for world-writable files, replace -u+w by -a+w. (The - before the permissions means that the file must have at least these permissions; without it find would search for a file that has exactly the distinct permissions.) With GNU find, you can also look for a file that is writable by the user running find: replace -perm -u+w by -writable.

In this case, frame the command as required.

Code: find

Everywhere

code: /

Only directories

code: var

Root owned file

code: - user root

Permission bits

Code: > s8

You might be interested in
Purpose of this project is to increase your understanding of data, address, memory contents, and strings. You will be expected t
STALIN [3.7K]

Answer:

See explaination for the details

Explanation:

#Starting point for code/programm

main:

la $a0,newLine #Print a new line

li $v0,4

syscall

# Find the number of occurence of a string in the given sentence

la $a0,prompt1 # Prompt the user to enter the first string.

li $v0,4

syscall

li $v0, 8 # Service 8 = read input string

la $a0, fword

li $a1, 9

syscall

la $a0,prompt2 # Prompt the user to enter the second string.

li $v0,4

syscall

li $v0, 8 # Service 8 = read input string

la $a0, sword

li $a1, 9

syscall

# process first word

li $t4,0 # Intialize the couter to 0

la $t0,sstatement # Store the statement into $t0

nstart1: la $t1,fword # Store the search word into $t1

loop1: # loop1 finds the number of occurences

# of input word in the given statment

lb $t2,($t0) # Load the starting address(character) of

# sstatement into $t2

lb $t3,($t1) # Load the starting address of input word

# into $t3

beq $t3,'\n',inc_counter1

beqz $t3,inc_counter1 # If $t3 is null , exit loop and print output

beqz $t2,print_output1 # If $t2 is null , exit loop and print output

move $a0,$t2 # Convert $t2 to lower, if it is upper case

jal convert2lower

move $t2,$v0 # Store the return($v0) value into $t2

move $a0,$t3 # Convert $t3 to lower, if it is upper case

jal convert2lower

move $t3,$v0 # Store the return($v0) value into $t3

bne $t2,$t3,next_char1 # If both characters are not matched current

# character in the string, go to next character

addiu $t0,$t0,1 # otherwise, increment both indexes

addiu $t1,$t1,1

j loop1 # go to starting of the loop

next_char1:

la $t5,fword

bne $t5,$t1,nstart1

la $t1,fword # Store the input word into $t1

addiu $t0,$t0,1 # Increment the index to goto next character

j loop1 # go to starting of the loop

inc_counter1:

addi $t4,$t4,1 # Increment the frequency counter by 1

la $t1,fword # Store input word into $t1

j loop1 # go to starting of the loop

print_output1:

la $t0,fword

L1:

lb $a0,($t0)

beq $a0,'\n',exL1

jal convert2upper

move $a0,$v0

li $v0,11

syscall

addiu $t0,$t0,1

j L1

exL1:

la $a0,colon

li $v0,4

syscall

la $a0, dash

li $v0, 4

syscall

move $a0,$t4

li $v0,1

syscall # print new line

la $a0,newLine

li $v0,4

syscall

# process second word

li $t4,0 # Intialize the couter to 0

la $t0,sstatement # Store the statement into $t0

nstart2: la $t1,sword # Store the search word into $t1

loop2: # loop1 finds the number of occurences

# of input word in the given statment

lb $t2,($t0) # Load the starting address(character) of

# sstatement into $t2

lb $t3,($t1) # Load the starting address of input word

# into $t3

beq $t3,'\n',inc_counter2

beqz $t3,inc_counter2 # If $t3 is null , exit loop and print output

beqz $t2,print_output2 # If $t2 is null , exit loop and print output

move $a0,$t2 # Convert $t2 to lower, if it is upper case

jal convert2lower

move $t2,$v0 # Store the return($v0) value into $t2

move $a0,$t3 # Convert $t3 to lower, if it is upper case

jal convert2lower

move $t3,$v0 # Store the return($v0) value into $t3

bne $t2,$t3,next_char2 # If both characters are not matched current

# character in the string, go to next character

addiu $t0,$t0,1 # otherwise, increment both indexes

addiu $t1,$t1,1

j loop2 # go to starting of the loop

next_char2:

la $t5,sword

bne $t5,$t1,nstart2

la $t1,sword # Store the input word into $t1

addiu $t0,$t0,1 # Increment the index to goto next character

j loop2 # go to starting of the loop

inc_counter2:

addi $t4,$t4,1 # Increment the frequency counter by 1

la $t1,sword # Store input word into $t1

j loop2 # go to starting of the loop

print_output2:

la $t0,sword

L2:

lb $a0,($t0)

beq $a0,'\n',exL2

jal convert2upper

move $a0,$v0

li $v0,11

syscall

addiu $t0,$t0,1

j L2

exL2:

la $a0,colon

li $v0,4

syscall

la $a0, dash2

li $v0, 4

syscall

move $a0,$t4

li $v0,1

syscall

exit:

# Otherwise, end the program

li $v0, 10 # Service 10 = exit or end program

syscall

############################ subroutine - convert2lower #################################

convert2lower: # Converts a character(stored in $a0) to

# its lower case, if it is upper case

# and store the result(lower case) in $v0

move $v0,$a0

blt $a0,'A',return

bgt $a0,'Z',return

subi $v0,$a0,-32

return: jr $ra # Return the converted(lower case) character

############################## subroutine - convert2upper ##################################

convert2upper: # Converts a character(stored in $a0) to

# its upper case, if it is lower case

# and store the result(upper case) in $v0

move $v0,$a0

blt $a0,'a',return2

bgt $a0,'z',return2

addiu $v0,$a0,-32

return2: jr $ra # Return the converted(lower case) character

4 0
3 years ago
3. Under which of the following categories does the artwork fall? ( 1 point )
Bumek [7]
Portrait is usually a painting of someone, still life is a very realistic drawing, monoprint is a print of an ex. leaf or other object.. its an ABSTRACT PAINTING
5 0
4 years ago
Read 2 more answers
The three main types of banks (Large Traditional, Credit Union, Online or Online-Only) have many tradeoffs with respect to techn
Margarita [4]
So from a little research, this is the order:
Online Bank, Credit Union, Traditional Bank

Online bank is the highest one since it uses technology like the internet to transfer money or to pay bills easily.
Credit union is same as an online bank where it also uses internet offering mobile and online banking services.
Traditional bank is the most common type of bank. They also offer mobile banking but they still use the old procedure of banking like depositing and withdrawing money, face to face.
5 0
3 years ago
Read 2 more answers
Which column and row references are updated when you copy the formula f$3/15
Tasya [4]

Answer: Column F

Explanation: In Microsoft excel, for the sake of robustness and to aid the effectiveness of updating formulas across cells. The reference of cells are treated as relative which means that when formulas are copied across columns or within rows, they get updated automatically. However, some numbers may be treated as constants such that we do not want them to change or be updated as we move acisss cells. Thus, such numbers are treated Given absolute references, which is made possible by adding a '$' prefix before the colum alphabet or row number or both. in the scenario given above, the row has the $ prefix, hence, it is absolute and will not change but the column alphabet does not and hence, treated as relative.

3 0
3 years ago
What is RAM? explain it
Zina [86]
RAM is memory in the computer
3 0
3 years ago
Read 2 more answers
Other questions:
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    7·1 answer
  • What is a tag in an HTML document?
    5·1 answer
  • Soft skills are similar to personality traits like being compassionate, having patience, and working well in groups.
    10·2 answers
  • Which of the following is a valid formula?<br> (C2-D16)<br> O A2/F2<br> O=B5/10<br> O =E10
    14·1 answer
  • A student builds a model of her bedroom. The scale is 1:25. In the scale model, the students bed is 3 inches long. How long is t
    10·1 answer
  • What correctly describes the features of the service called kickstarter?
    14·2 answers
  • When performing the ipconfig command, what does the following output line depict if found in the tunnel adapter settings?
    5·1 answer
  • A pizza delivery restaurant decides to stop hiring drivers and start hiring cyclers to deliver its pizza. The restaurant thinks
    15·1 answer
  • Can you log into your account with another phone​
    5·2 answers
  • How Much did a case of soda (any kind your choice ) cost in 2004?<br> PLS HELP!!!!!!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!