Operating systems & System Programming, Laboratory work #1
Write a script that finds all the files in the specified directory and all its subdirectories owned by the specified user. The owner name and directory are specified by the user as the first and the second command-line arguments. The script outputs the results to a file (the third argument of the command line) in "Full path, file name, size in bytes" format. The console displays the total number of scanned files.
-
Save the script.sh file
-
Give it execute permission
chmod +x script.sh
-
Run the script
./script.sh [ownername] [directory] [outputfilename]