![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
Hi I am trying to find files over a size given by the user. this is what I have so far Code:
echo "Enter a pathname to check (example = /home/jsk1gcc/testwork): " read input echo "Enter a the size (examples = 100k, 10M, 1G): " read size find $input -size +$size echo echo "Hit the Enter key to continue" read junk;; Nothing happens. When something like /var or /etc is inputted for the pathname the command works. though a full pathname including the user does not. I am logged on as this user, would I need to be root for this to work maybe? OR is there something wrong with the code. Any help would be great. ![]() Jade. |
|
|||
|
No file big enough? Diectory is a link? See if you get anything from this command. It looks for files (not directories or other types) larger than one character, following any links. It also has the "-print" switch because some versions of find don't output anything to terminal unless specify. Code:
find /home/jsk1gcc/testwork -type f -follow -size +1c -print |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find with file size and show the size | rpraharaj84 | Shell Programming and Scripting | 3 | 10-06-2009 02:42 PM |
| Find problems | candyzouk | Shell Programming and Scripting | 6 | 03-26-2009 11:40 PM |
| how do I find the size of..... | davidtymon | Shell Programming and Scripting | 1 | 02-11-2009 02:21 AM |
| command to find out total size of a specific file size (spread over the server) | abhinov | SUN Solaris | 3 | 08-08-2007 07:48 AM |
| find the file by size | rooh | UNIX for Dummies Questions & Answers | 1 | 08-16-2001 08:21 AM |