Problem with bash find command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem with bash find command
# 1  
Old 04-01-2010
Problem with bash find command

I'm trying to print all files which have the file permission 775 and that is 1MB or greater in long format.

This is what I have:
find -L -perm 775 -size +1000k -print


when I run this script nothing appears in terminal. What am I doing wrong?
# 2  
Old 04-01-2010
I would add the path and file type flags and if you want long format you will need to add exec as well. You should also validate that the files your trying to find have permissions 775, because the command will not find alternate permissions.
Code:
find -L . -type f -perm 775 -size +1000k -exec ls -l {} \;

# 3  
Old 04-01-2010
Thanks, that did it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash find : another problem with prune

Hello. I am searching file between dates and try to apply the comments from Chubler_XL in my thread : Linux find command : how to use multiple conditions But i get a null result as i am expecting to find 32 files. Setting my computer date to the date of the thread ( 30/05/2019 ) and... (4 Replies)
Discussion started by: jcdole
4 Replies

2. UNIX for Beginners Questions & Answers

Bash command to find a file and print contents

I need to find a file and print its contents I am trying but it is not working find -path /opt/app-root/src/.npm/_logs -type f -name "*.log" -print Version $ bash -version GNU bash, version 4.4.12(1)-release (x86_64-pc-msys) (1 Reply)
Discussion started by: SVRao19056
1 Replies

3. Programming

Bash script - find command with delete and exec

hi all, i have devised a script that starts in /restored/ and in there, there are a lot of sub folders called peoples names and in the sub folders are files/folders and it deletes the data in the sub folders BUT not the sub folder itself and it should then touch a file in all the sub folders... (3 Replies)
Discussion started by: robertkwild
3 Replies

4. Shell Programming and Scripting

problem in find command

I am facing problem in find command. I want to read all file names of a directory and write those names in a text file. My script is find /home/Pratik/src -type f -exec basename {} \; >> names.txt The script is working fine and writing all the file names but problem is file names are not... (5 Replies)
Discussion started by: pratikjain998
5 Replies

5. Shell Programming and Scripting

BASH script problem using find, ideas?

Hi, I'm trying to write a script to search through my computer and find all .jpg files and put them all in a directory. So far I have this: for i in `find /home -name '*.jpg' ` ; do mv $i home/allen/Pictures/PicturesFound ; done When I run it, I get this error (this is only part of it, it... (2 Replies)
Discussion started by: FortressPTH
2 Replies

6. UNIX for Dummies Questions & Answers

Problem with Find command

Hi, I have a script below,which reads dates from No_weekandMonthend_dates.txt performs the copy operation. for i in `cat /tmp/No_weekandMonthend_dates.txt` do cd $Gerenimopath/ZH_LP find . -type f -name "$i_*.txt" -exec cp {} /home/gaddamja/TempLocal \; cd... (2 Replies)
Discussion started by: jagadish_gaddam
2 Replies

7. Shell Programming and Scripting

Problem with find command

Hello Friends, When i give the command from path from path /var/tmp/asirohi/jdk/docs:- find /var/tmp/asirohi/jdk/docs/ . -depth -name license_*.html I get the following output:- /var/tmp/asirohi/jdk/docs/zh_Hant/jre/license_zh_Hant.html... (3 Replies)
Discussion started by: asirohi
3 Replies

8. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

9. Shell Programming and Scripting

command find returned bash: /usr/bin/find: Argument list too long

Hello, I create a file touch 1201093003 fichcomp and inside a repertory (which hava a lot of files) I want to list all files created before this file : find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies

10. Shell Programming and Scripting

Problem with find command

Hi, I am using the find command to remove all the files in a directory ending .NEW and created more than a day ago. The command I am using is: find . -name '*.NEW' -ctime +1 | xargs rm The problem is that it does not work properly. I still have files which were craeted more than a day... (7 Replies)
Discussion started by: nattynatty
7 Replies
Login or Register to Ask a Question