Using Sol 10 + KSH.
I need to run a find command on the whole system "/" and exclude a bunch of explicit directories and files that may or may not be on each system.
I cannot use the -name because i dont want to exclude all dirs named just specific paths.
-path/-wholename is not an option on the Solaris FIND utility
What i have is working, but I just wanted to throw this out t
I'm trying to find all files that are of a certain type and do not contain a certain string. I am trying to go about it by piping find to grep -v
example:
find -type f -name '*.java' | xargs grep -v "something something"
This does not seem to work. It seems to be just returning all the files that the find command found.
Hello,
I'm having trouble looking for info for SUSIE on this CVE-2012-4681.
This is basically the newest Java hit. It is mostly a web browser issue but I would like to see if the versions on our servers are vulnerable. I already found the pages/info for Solaris and RHEL.
Any help would be great.
Hi all,
1). Is is possible to use the date builtin and subtract a literal e.g 1 day in bash alongwith the find command from the command line:
e.g
Code:
find . -name --date %Y-%m-%d - 1
2).
Is is it possible to use the locate command to only find directories? To rephrase, I want to search for a directory, and exclude any result that is not a directory, such as files or symlinks to files.
While not necessary, I would like the solution to also return symlinks to other directories (but again, not files).
Lastly, I would like to exclude directories within foo, with one exception.
Hi,
I have more than 1000 directories under one directory (lets says under /home/).
Sub directories are like A1 to A100,B1 to B100 etc..
Here my problem is I need to find the files older than 10 days in the directories which starts with A*.
I tried some thing like this which is not working.
Code:
find .
I have a list of file names as output of certain command.
I need to find each of these files in a given directory.
I tried following command:
ls -R /home/ABC/testDir/ | grep "\.java" | xargs find /home/ABC/someAnotherDir -iname
But it is giving me following error:
find: paths must precede expression: XYZ.java
What would be the right way to do it?
Hello,
I am running some performance based tests on Solaris, and I was wondering how fast the "seeking" rate of Solaris is, or how fast Solaris can get information about files with the "find" command. Does anyone know what 'find' command I could run to traverse through my system to see the rate of files scanned/hour?
Thanks in advance
Chance is that there will be empty files (zero byte files) and empty directories (that doesn’t contain any files) in your system. In this article, I will show you how to locate these empty directories and files and delete them.
The command you can use is the "find" command. To find empty directories in the current directory, you use the option -empty:
find .