'Find' newb; looking for feedback


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers 'Find' newb; looking for feedback
# 1  
Old 09-18-2011
'Find' newb; looking for feedback

Working with examples from a text I found online not quite getting the results I want. Hoping I could have someone look at them and give me some feedback.

Find is set to display contents of subdirectories correct? How do you repress that?

Code:
find ~ -size +9500k -mtime -7

This should display all files in my home directory greater than 9500 kb and modified within 7 days? I'm making the assumption we can work with k, M, G for sizes?

Code:
find /www/data[10-99] -group www

Not working just yet, I can assign a wildcard to data directories but I'm trying to limit to a range [10-99] only displays info from /www/data10/

Thanks for your constructive feedback.
# 2  
Old 09-18-2011
Yes you can use regex to limit the data dirs that find searches by using what you have...
Code:
find /www/data[10-99]

This will search all dirs starting from /www/data10 all the way to /www/data99...so what is the issue you are having.
# 3  
Old 09-18-2011
I created dir www/data1-99 and thru in a bunch of empty files, the results of that only shows files in the /www/data1/ and ignores the other directories.
# 4  
Old 09-18-2011
Quote:
Originally Posted by crownedzero
I created dir www/data1-99 and thru in a bunch of empty files, the results of that only shows files in the /www/data1/ and ignores the other directories.
That maybe because the other dirs arent owned by group "www".
# 5  
Old 09-18-2011
why wouldn't they? they were all created at the same time by the same user
# 6  
Old 09-18-2011
Quote:
Originally Posted by crownedzero
Code:
find /www/data[10-99] -group www

Not working just yet
Shell globbing doesn't work that way. [] brackets specify character ranges, not integer ranges. So:
Code:
find /www/data[1-9][0-9] -group www

# 7  
Old 09-18-2011
and if I wanted to exceed 100 i'd just have to add another [0-9]?

---------- Post updated at 03:16 PM ---------- Previous update was at 03:07 PM ----------

For data[1-9][0-9] I get no so file or directory. Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Feedback wanted for upcoming script language

Hi I'm currently rewriting a project from install-required to a pure runtime form. The former had required the project name and the definition of the command as name, as they all become functions now, this could be shorter. As you might have figured, the project already exists in another... (3 Replies)
Discussion started by: sea
3 Replies

2. What is on Your Mind?

Wanted: Feedback on TUI (2)

Hello everyone It just so happend that TUI was rejected from GNU for the moment, with one of the reasons beeing that additional user feedback was required. So, if you like scripting, bash in specific, please have a try and report your feedback, to help me find all issues to fix, and as i... (0 Replies)
Discussion started by: sea
0 Replies

3. What is on Your Mind?

Wanted: Feedback on TUI

Hello Couldnt think of a better place than "What is on your Mind". So me have that project https://www.unix.com/shell-programming-and-scripting/253496-tui-text-user-interface-framework-scripts.html. :b: Eventhough i tried to describe it well in its thread and its README.md on github, i've... (15 Replies)
Discussion started by: sea
15 Replies

4. Post Here to Contact Site Administrators and Moderators

Feedback: Allow tar.gz extension for files

Hi, ich just uploaded a file to the forum and found that the tar.gz extension for files is not allowed... i renamend the file to *.zip but tar.gz is a common format in the unix world. is it possible to change that? tia, DN2 (2 Replies)
Discussion started by: DukeNuke2
2 Replies

5. Shell Programming and Scripting

kshdb feedback

Hi I'm looking for some feedback on kshdb, what are peoples general feeling about it etc. Also has anyone used this as a test mechanism? I am thinking about trying to wrap a basic test script around this. (0 Replies)
Discussion started by: eeisken
0 Replies

6. Programming

Feedback algorithm

Hi I search an exemple of scheduling Feedback algorithm, or help about how to create one. Thanks (0 Replies)
Discussion started by: messier79
0 Replies

7. News, Links, Events and Announcements

Password Creation Site - Feedback

Hi, I created a new site called http://www.goodpassword.com to help users and adminstrators create good, random passwords. It also includes .htaccess encryption. I'd be interested in feedback ie errors, improvements, additions etc. thanks DJay (0 Replies)
Discussion started by: djay
0 Replies

8. UNIX for Dummies Questions & Answers

feedback form ?! :-(

hi, i am VERY new to UNIX. just wanted some help on a feedback form that i have hosted on a unix server. the feedback form is in asp and doesnt work on unix. any other language to get it working ?? HELP !!! (3 Replies)
Discussion started by: shahenil
3 Replies

9. Shell Programming and Scripting

Feedback on Script.

Hi all, Would like to get some feedback on a scrip that I've finished writing at home for work. Any constructive feedback from operations used to legibility, etc. would be appreciated - anything at all. It's my first real script that will be running on a clients server. The script is... (2 Replies)
Discussion started by: Cameron
2 Replies
Login or Register to Ask a Question