10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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. Shell Programming and Scripting
If condition satisfy, want to find pattern and modify two Fields in Modify.txt
Input.txt
SOURCE1
SOURCE2
SOURCE3
SOURCE4
SOURCE5
SOURCE6
Modify.txt
SOURCE1|SLA|2016/12/11 11:12:11 PM|HMM|11-11-16|
SOURCE2|SLA|2016/13/11 11:12:11 PM|HMM|10-11-16|
SOURCE3|SLA|2016/14/11 11:12:11... (7 Replies)
Discussion started by: Joselouis
7 Replies
3. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
4. UNIX for Dummies Questions & Answers
Hello all,
this is my first and probably not my last question around here. I do hope you can help or at least point me in the right direction.
My question is as follows, I need to find files and possible folders which are not owner = AAA group = BBB with a said location and all sub folders ... (7 Replies)
Discussion started by: kilobyter
7 Replies
5. Shell Programming and Scripting
Hello All,
Can someone please help me out in creating the find command to search and delete files older than 1 days at a desired location.
Thanks in advance for your help. (3 Replies)
Discussion started by: Pandee
3 Replies
6. Shell Programming and Scripting
Hi Forum,
I am using the below command to find files older than x days in a directory excluding subdirectories. From the previous forums I got to know that prune command helps us not to descend in subdirectories. Though I am using it here, not getting the desired result.
cd $dir... (8 Replies)
Discussion started by: jhilmil
8 Replies
7. Linux
I've been using this to search an entire directory recursively for a specific phrase in my code (html, css, php, javascript, etc.):
find dir_name -type f -exec grep -l "phrase" {} \;
The problem is that it searches ALL files in the directory 'dir_name', even binary ones such as large JPEG... (2 Replies)
Discussion started by: Collider
2 Replies
8. Shell Programming and Scripting
Hello,
I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found.
For instance.
I can start the script with arguments for keyword and for value, i.e
script.sh keyword... (1 Reply)
Discussion started by: yart
1 Replies
9. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
10. Cybersecurity
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? (5 Replies)
Discussion started by: maficdan
5 Replies