English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Create a script called 'thisdir' that lists the directories those contain the files of specified size in the given directory (except the current directory). thisdir has two input arguments directory_path and size_of_file. It searches through the given directory and list the name of all its sub-directories, which contains any file equal to or greater than the size_of_file specified.

2006-10-27 03:47:43 · 3 answers · asked by iMaXX 4 in Computers & Internet Programming & Design

Thanks ebrosch! but thats wht i did.
echo "Enter Path"
read PATH
echo "Enter Size"
read SIZE
find $PATH -size ${SIZE}c
but it's not working error is "find command not found!"
but it's working without variables(fixed path and size)

2006-10-30 22:09:55 · update #1

3 answers

The logic/syntax of your script is perfect. The only reason its not working is the statement - 'read PATH', where in the PATH env variable is being overwritten by the directory name you type in, as a result the system is not being able to locate the 'find' command.

Just change the variable name to some thing else.
/*************************/
echo "Enter the path: "
read cpath
echo "Enter size: "
read isize
find $cpath -size ${isize}c
/*************************/

2006-11-01 18:10:21 · answer #1 · answered by mashiur1973 2 · 0 0

Look at the parameters for the "find" command and you will see that it should handle almost all of the requirements you have. You will then need to send the output to either awk or sed to get just the directory names from the output which will be all of the files which match your search criteria.

2006-10-28 13:27:06 · answer #2 · answered by ebrosch 2 · 0 0

First, acquire a hexadecimal editor. (Google it and u gets lots.) p.c.. one. After downloading. installation it. flow on your root folder and back up explorer.exe Open Explorer.exe with the hex editor. scroll and seem for the letters s t a r t. this could be quiet a activity. (i visit enable you be attentive to any hint approximately its area later) enter your call in place of the letters s t a r t. replace the letters with letters of your call save it. restart pc. (Dont ignore to backup your explorer.exe) (I havent tried better than 5 letters. much less is okay, yet i dont be attentive to the thank you to jot down better than 5 letters.) I declare no accountability for any injury you ought to do on your OS.

2016-11-25 23:16:27 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers