Recursive search for group or other writeable 'dot' files


 
Thread Tools Search this Thread
Special Forums Cybersecurity Recursive search for group or other writeable 'dot' files
# 1  
Old 02-13-2008
Recursive search for group or other writeable 'dot' files

I'm looking for a easy way to do a recursive search through a directory structure for all files that begin with '.' that are group or other writable.

Any suggestions?
# 2  
Old 02-13-2008
Quote:
Originally Posted by maficdan
I'm looking for a easy way to do a recursive search through a directory structure for all files that begin with '.' that are group or other writable. Any suggestions?
For shame, that is actually in the "find" man-page EXAMPLES section.

Code:
find . -type f -name ".*" -perm /-g+w,u+w

# 3  
Old 02-14-2008
thanks

For shame??

Man pages are a great resource, but they aren't the end all/be all.

Not all man pages are alike and the ones that I looked at did not have this example. I checked again, just to be certain. I will certainly try what you mentioned and report back what happens. - again thanks for the suggestion.
# 4  
Old 02-14-2008
Hi,
This is pretty simple to search recursively.
This can be done in three ways.
1. ls -R this command work beautifully ,but not all version of ls have -R option.
2. find . ~print should work everywhere
3. du ~a . shows both name and size of the file.

So tryout this command,
By.................Smilie
# 5  
Old 02-14-2008
"For shame, that is actually in the "find" man-page EXAMPLES section."

And as expected, this did not work. However, using the 'perm' flag ended up being what I wanted.

Thanks for the help but you need to work on your delivery.
# 6  
Old 02-14-2008
Didn't work

"find . -type f -name ".*" -perm /-g+w,u+w"

No shame here. This did not work. However by putting the syntax that I needed, I was able to get what was necessary by using the -perm flag.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search for files owned by particular owner and group

I am searchingfor files owned by particular owner and group in a particular directory including its sub-directories. I use find <dir> -user <user> -group <group> -exec ls -l {} \; It does not work completely. In the sense is a subdirectory is owned by 'user' and group 'group' then all... (9 Replies)
Discussion started by: Soham
9 Replies

2. OS X (Apple)

Search recursive

before posting, I have tried to find my answer elsewhere. no luck. I need to find a file buried in a folder somewhere. Master folder has 10 sub folders. each sub folder has folders too. I found this but it does nothing I am on Mac and use Applescript. do shell script "find... (2 Replies)
Discussion started by: sbrady
2 Replies

3. Shell Programming and Scripting

sed - search and replace whole string which contains dot

Hello. I would like to search exactly "string1.string2.string3" and replace it by "new_string1.new_string2.new_string3" And I would like to search exactly "string2.string3" and replace it by "new_string2.new_string3" And I would not found in the result : "string1.new_string2.new_string3"... (3 Replies)
Discussion started by: jcdole
3 Replies

4. Shell Programming and Scripting

Recursive search for files and copy to new directories

So I have extremely limited experience with shell scripting and I was hoping someone could point out a few commands I need to use in order to pull this off with a shell script like BASH or whatnot (this is on OS X). I need to search out for filenames with account numbers in the name itself... (3 Replies)
Discussion started by: flyawaymike
3 Replies

5. Shell Programming and Scripting

need a one liner to grep a group info from /etc/group and use that result to search passwd file

/etc/group tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453 bin::2:root,daemon sys::3:root,bin,adm adm::4:root,daemon uucp::5:root /etc/passwd mk789:x:234:1::/export/home/dummy:/bin/sh po312:x:234:1::/export/home/dummy:/bin/sh ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies

6. Shell Programming and Scripting

recursive search and copy

Hello again. Well, I need help again sooner as I thought. Now I want to search for files with a known name within all subdirs, and copy the to differently named files in the same directory. For example if I had only one file to copy, I would just usecp fileName newFileNamebut to do this... (1 Reply)
Discussion started by: cabaciucia
1 Replies

7. UNIX for Advanced & Expert Users

Recursive search for filenames containing ..

Hi all, Since my gopher server doesn't like filenames containing 2 or more consecutive dots in a filename, I'd like to do a search for them and replace them with... well, let's say underscores... I've tried a oneliner or 2 from other posts, but they don't seem to work well with locating dots.... (3 Replies)
Discussion started by: Evert
3 Replies

8. UNIX for Dummies Questions & Answers

recursive search and ftp

Could someone help me in recursive search and ftp'ing the files to remote server? The host machine will have /dir1/dira/list_of_files1 /dir1/dirb/list_of_files2 /dir1/dirc/list_of_files3 . . . so., I need to search from dir1 recursively (only one level down) and find all the files that... (1 Reply)
Discussion started by: brahmi
1 Replies

9. Shell Programming and Scripting

Using find command to search a pattern in group of files

Hi i am having a group of *.csh files under parent directory. Now i want to search a particular pattern in these group of *.csh files(suppose i need to search a pattern ABC - proj ). Can anyone please tell me how to do it using find command. Thanks in advance sarbjit (4 Replies)
Discussion started by: sarbjit
4 Replies

10. UNIX for Dummies Questions & Answers

How do I search my dot files for suspicious text?

My company Unix guru enabled fortune in my .login (dot login?) file. When i asked him how he did it he told me to search my dot files for "suspicious" text. He wants me to learn more about all of the dot files. (1 Reply)
Discussion started by: noobie_doo
1 Replies
Login or Register to Ask a Question