Find command with Ignore Access issues


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Find command with Ignore Access issues
# 1  
Old 10-06-2016
Find command with Ignore Access issues

Hi,

I am using following command to find a specific file.

Code:
find . -name "find*.txt" -type f -print

I am issuing that command at root directory since I don't know in which sub folder that file is getting created from some other process.

As I am not having access to all directories, my command dumping lot of error messages on console like " Can't access this directory.....!" etc. It is becoming very difficult to find the message where the file actually present from my command.

Is there any way that we can exclude/ignore access issues from find command result? Thank you..



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 10-06-2016 at 03:25 PM.. Reason: Added CODE tags.
# 2  
Old 10-06-2016
Code:
find . -name "find*.txt" -type f -print 2>/dev/null

This User Gave Thanks to rdrtx1 For This Post:
# 3  
Old 10-06-2016
Thank you....That perfectly worked...
# 4  
Old 10-06-2016
Above solution is perfect.

Note that, if you have gnu find can also use ,

Code:
man find

Quote:
-readable
Matches files which are readable. This takes into account access control lists and other permissions artefacts
which the -perm test ignores.
Seems there is no -s option in find command similar to grep command Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

AIX find ignore directory

I am using aix. I would like to ignore the /u directory. I tried this but it is not working. find / -type f -type d \( -path /u \) -prune -o -name '*rpm*' 2>/dev/null /u/appx/ls.rpm /u/arch/vim.rpm (4 Replies)
Discussion started by: cokedude
4 Replies

2. Shell Programming and Scripting

Script using awk to find and replace a line, how to ignore comment lines

Hello, I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

3. Shell Programming and Scripting

Ignore .txt in find script

Hi i am really new to linux scripting and i need a little bit help. i have the following script: find "/usr/share/nextcloud/data/__groupfolders" -type f -mtime +14 -exec rm {} \; but i don't want to delete everything. I want to ignore .txt files. How can i do this? (3 Replies)
Discussion started by: Frederic
3 Replies

4. SCO

Grep to ignore suffix & find end of line

In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
Discussion started by: wbport
7 Replies

5. Shell Programming and Scripting

Find command with ignore directory

Dear All, I am using find command find /my_rep/*/RKYPROOF/*/*/WDM/HOME_INT/PWD_DATA -name rk*myguidelines*.pdf -print The problem i am facing here is find /my_rep/*/ the directory after my_rep could be mice001, mice002 and mice001_PO, mice002_PO i want to ignore mice***_PO directory... (3 Replies)
Discussion started by: yadavricky
3 Replies

6. Shell Programming and Scripting

Find: ignore directory completely

Hello, I know find can be prevented from recursing into directories with something like the following... find . -name .svn -prune -a type d But how can I completely prevent directories of a certain name (.svn) from being displayed at all, the top level and the children? I really... (2 Replies)
Discussion started by: nwb123
2 Replies

7. Homework & Coursework Questions

Security issues with universal access of file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: If you look at the permissions associated with a symbolic link, it has universal access. Does this lead to... (0 Replies)
Discussion started by: linux17
0 Replies

8. UNIX for Advanced & Expert Users

Flagged Drives Create Access Privilege Issues

Upon trying to open up permissions between 2 accounts in Snow Leopard I caused the os to crash - restarting/turning off then on did nothing - the os would no longer load. I took it into Apple where they got the os back up and running with a slight twist. The secondary drive was flagged (a little... (0 Replies)
Discussion started by: Alexander4444
0 Replies

9. UNIX for Dummies Questions & Answers

How do I ignore certain dir while using find? solved.

Hello everyone, I'm a newbie. I've got a problem while using find. I know there is a way to do it in man find which is something like find . -wholename './src/emacs' -prune -o -print it works but i also want to use -daystart, -mtime, -type on it and i dont know whats the sequence of these... (0 Replies)
Discussion started by: aquaraider
0 Replies

10. UNIX for Dummies Questions & Answers

Issues I'm having with the Find Command

:confused: I've been trying to display all my files in my /tmp directory when I'm in it. I just can't get the darn find command working... And I've been trying to look at my /tmp directory on my home directory and I know I'm messing something up there.. Another issue I had while back but... (12 Replies)
Discussion started by: curtner
12 Replies
Login or Register to Ask a Question