0
votes
2answers
287 views

Trying to find any home directory that is writable by anyone

I am trying to locate any user home directories and their files that are writable by anyone. I wrote this: find /home -type d -perm -200 | grep . || echo no world-writable directories here ...
3
votes
1answer
255 views

Delete old log files in AIX

I am trying write a script to delete old log files in \var\log\applog\nmon on my AIX system. We usually get alerts that the file system is almost full and at the moment delete old files by hand. So ...
2
votes
2answers
2k views

Renaming multiple files which match UNIX find keyword

I have the following output from find command for finding files containing yyy in name: ./plonetheme/xxx/yyy-logo.png ./plonetheme/xxx/profiles/default/plonetheme.yyy_various.txt ...
0
votes
1answer
270 views

ls link count seems incorrect - how do I ensure I'm not deleting the inode contents?

ls -lai on a file gives me a link count of 2: 16508 -rw-rw-rw- 2 ... Then looking for all the filenames returns only one: find "$dir" -inum 16508 This lists only the original file, not two. ...
1
vote
2answers
599 views

File name with spaces piped to two xargs commands

I have a directory and many more subdirectories like the following - file with spaces.txt filewithsuperlonglines.txt ordinaryfile.txt binaryfile.bin The command - find . -type f -print0 | ...
2
votes
1answer
44 views

find command unpredictable behaviour?

I am working on a remote machine,the disk space on the HP-UNIX machine was 96% so I was going to reduce the disk space by zipping some "*.extract.sys" files. $find . "*extract.sys" -exec ls -lrt {} ...
1
vote
1answer
371 views

How to exclude the hidden directory from the result of find command

I am searching for some directories in find command and if that directory is present then I need to take some action on it. But what is happening is: At some places though the main directories (for ...
1
vote
2answers
468 views

find shellscript execute command for every file

I found "find" command is much faster than "Spotlight" in mac os x i rather visualize the results with automator with no luck so I hope geeks around SU will help with solution about that a ...
0
votes
1answer
217 views

find and mail if changes has occured, unix

The following script runs and finds if any new suid has been changed, and redirects the output to a file. I want to add a mail command in the script, that will send mail to someone@domain.com. If ...
0
votes
6answers
2k views

A better way to search for a string within a file?

I am trying to find a particular string of text in a file somewhere on my hard drive. The best I have come up with so far is: find -type f / | xargs cat | grep "string to find" But this just tells ...