Hi,
I want to access files from different directories (for example: /home/dir1/file1 , /home/dir2/file2 ...) Like this i have to access these files(file1, file2...).
grep "what you want to search" < /home/dir1/file1
What is the problem ?
Used Code tags
Thanks for your reply Max,
But actually i dont know wat are all the files will in that directory and i have to access those files sequencely and one more thing directory(dir1) also getting change. In short, i have access different files from different directories.
find /home/ -type f | xargs grep "what you want to search"
This will do the job
find command will list all the files recursivily and xargs will make them as agrument to your grep command
Let me know if you still face any issue