Question

please write down a pseudo code that implements shell command “find . -name myfile -print”. as

please write down a pseudo code that implements shell command “find . -name myfile -print”. as

Homework Answers

Answer #1

Solution:

Givendata:

find . -name myfile -print
 This command tells the find command to look
inside the .directory and every subdirectory to
look for a file or directory with the name myfile
and to display each match it finds
 find . -name “foo*” -amin -10 -print
This command tells the find command to look
inside the current directory and every subdirectory
to look for a file with name begin with foo that
have been accessed in the last 10 minutes and to
display each match it finds

Pseudo code:

$ # Let's make some test files $ mkdir ASCII-finder $ cd ASCII-finder $ dd if=/dev/urandom of=binary.file bs=1M count=1 1+0 records in 1+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.009023 s, 116 MB/s $ file binary.file binary.file: data $ echo 123 > text.txt $ # Let the magic begin $ find -myfile-print0 | \ xargs -0 -I @@ bash -c 'file "$@" | grep ASCII &>/dev/null && echo "file is ASCII: $@"' -- @@ 
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Linux File Systems: Please write down a pseudo code that implements shell command “find . -name...
Linux File Systems: Please write down a pseudo code that implements shell command “find . -name myfile -print”.
Linux File Systems: please write down a pseudo code that implements shell command “find . -name...
Linux File Systems: please write down a pseudo code that implements shell command “find . -name myfile -print”.
Write pseudo code for the following conditions: • Simulated Annealing with T=0 at all times and...
Write pseudo code for the following conditions: • Simulated Annealing with T=0 at all times and ommiting the termination test • Genetic algorithm with population of size 1 • Modify the Hill Climbing algorithm so that it implements random restarts H.C
Write a code segment to print your name ten times on the screen using a while...
Write a code segment to print your name ten times on the screen using a while loop. Use one variable called count to act as a counter for the loop. Discuss how would you print your name 1000 times on the screen. NOTE: You can either type your code into the text box or upload a document to the discussion board by clicking the "attach" clip at the bottom left of the discussion box.
a) Write PSEUDO CODE!!! for Min_Heap_Delete(A,i) which deletes the item at position i in Min_Heap A....
a) Write PSEUDO CODE!!! for Min_Heap_Delete(A,i) which deletes the item at position i in Min_Heap A. Assume that A is a one-dimensional array. Hint:Think about “bubbling up” and “bubbling down” and the operations that do these. b) give the best upper bound you can on the worst case running time of your method, in ordered notations. SOLVE IN PSEUDO CODE ONLY!!!! NOT JAVA!!
Write a program in C that takes a file name as the argument on the command...
Write a program in C that takes a file name as the argument on the command line, and, if the file is a symbolic link, prints out the contents of that link (i.e. the file name that the link points to). If it is not a symbolic link, the program should print an error int main ( int argc , char * argv [] ) { // Check if the user gave an argument , otherwise print " ERROR :...
Using a for loop and range command, print the sequence of numbers from 1 to 20...
Using a for loop and range command, print the sequence of numbers from 1 to 20 (skipping two numbers for each element); that is, your code should print out the numbers 1,4, 7, 10, … (max should not exceed 20). Use x as the variable name
Write pseudo-code to solve the problem using MapReduce and explain how it works. Each line in...
Write pseudo-code to solve the problem using MapReduce and explain how it works. Each line in the file lists a person’s ID, name, age, and the number of friends he or she has. For example line 1 indicates that the person has ID of 0, his name is Will, his age is 33, and he has 385 friends. Given the file, find out the average number of friends by age. 0,Will,33,385 1,Jean-Luc,26,2 2,Hugh,55,221 3,Deanna,40,465 4,Quark,68,21 5,Weyoun,59,318
Draw flowchart AND write pseudo code User asks you to develop a program to calculate and...
Draw flowchart AND write pseudo code User asks you to develop a program to calculate and print weekly payroll. Calculations must take into account the following: User input ? a. Income tax rate is rate is 15% (.15*salary) b. Social Security tax is 7.65% (.0765*salary) c. Display salary, income tax, social security tax, and net pay net pay=salary-income tax – social security tax
Pleas code in Java Write a generic class named PairImpl that implements the interface below.write a...
Pleas code in Java Write a generic class named PairImpl that implements the interface below.write a program that creates list of 3 pairs where each pair represents the name of a fruit and the quantity.    Once the list is populated three pairs of fruits and quantities, it then prints each pair shown in the sample run using a for loop.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT