Question

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”.

Homework Answers

Answer #1

Psuedo 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”.
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
You must write the shell in C/C++ for Linux systems, and the shell must have the...
You must write the shell in C/C++ for Linux systems, and the shell must have the following functionality : can use command list to list files and directory of a given directory;
5. Write a bash command that will display the name of every file on the Linux...
5. Write a bash command that will display the name of every file on the Linux system whose file contaent contains the string "doug.jones". The command must run in the background, must redirect standard error to /dev/null, and must redirect standard output to ~/out. 6. Write a bash command that will kill all of the even-numbered processes associated with your userid, and no other processes. 7. Write a bash command that will start the program /home/courses/140u-doug.jones/zombie_maker as a background process,...
should be in Linux, please Write a shell program named A1L21 Your program should set permissions...
should be in Linux, please Write a shell program named A1L21 Your program should set permissions for a file whose name is given as an argument to your program. The permissions must be changed using a SINGLE chmod command, and must be set to EXACTLY rw for owner and group and x for others. Your program should NOT show any error messages on the screen, even if the given file does not exist, etc.
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
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 :...
How would I go about answering these questions In linux. Please provide the correct linux command...
How would I go about answering these questions In linux. Please provide the correct linux command needed to answer these 4 questions 5. Display total words of each file under your root directory and subdirectories. 6. Change permission of every filename ends “.py” to — write read execute, group - read execute, other - execute 7. Find every line which contains “hello” from your file system, display both file name, line number. 8. Combine files with name “p3.py”, “p31.py”, “p32.py”,...
Write Linux command lines to do the following: 1. Create a directory with name “yourName_ID” 2....
Write Linux command lines to do the following: 1. Create a directory with name “yourName_ID” 2. Create a file with name “yourLastName.txt” inside the directory created in step.1 3. Write inside the created file exactly the following content (you may use editors such as vim, pico, ….): Linux Lab Lab. ToDo#1 Summer Semester 2019/2020# 4. Display the first 2 lines of the file. 5. Change the permission of the file to read write and execute for owner, groups and others....
How to use command line argument in python to write a program implement linux command 'find'?
How to use command line argument in python to write a program implement linux command 'find'?