Searching for a directory containing only .class files in Unix [on hold] The 2019 Stack Overflow Developer Survey Results Are InLooking for a Java class in a set of JARs with find, unzip, grepJRE in Kubuntu doesn't allow me to run .jar fileSearch class names in jarsSearch for a String inside all files inside a warIs possible to change the value of '.' without actually change the current directory?Problem with either su username -c “./script.sh” and sudo -u username bash -c “./script.sh” and Java classpathRunning Java classes in a package --> Error: Could not find or load main classCannot start Tomcat 7 as Apache Commons DaemonSetting classpath for JavaHow to replace a file in a zip
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
Old scifi movie from the 50s or 60s with men in solid red uniforms who interrogate a spy from the past
Deal with toxic manager when you can't quit
How much of the clove should I use when using big garlic heads?
How to charge AirPods to keep battery healthy?
Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?
Dropping list elements from nested list after evaluation
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
What is this business jet?
Getting crown tickets for Statue of Liberty
What do hard-Brexiteers want with respect to the Irish border?
How to translate "being like"?
What is the light source in the black hole images?
Why can't devices on different VLANs, but on the same subnet, communicate?
Why not take a picture of a closer black hole?
What is the motivation for a law requiring 2 parties to consent for recording a conversation
Why doesn't UInt have a toDouble()?
Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?
Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?
Why doesn't shell automatically fix "useless use of cat"?
Cooking pasta in a water boiler
ODD NUMBER in Cognitive Linguistics of WILLIAM CROFT and D. ALAN CRUSE
A word that means fill it to the required quantity
How do PCB vias affect signal quality?
Searching for a directory containing only .class files in Unix [on hold]
The 2019 Stack Overflow Developer Survey Results Are InLooking for a Java class in a set of JARs with find, unzip, grepJRE in Kubuntu doesn't allow me to run .jar fileSearch class names in jarsSearch for a String inside all files inside a warIs possible to change the value of '.' without actually change the current directory?Problem with either su username -c “./script.sh” and sudo -u username bash -c “./script.sh” and Java classpathRunning Java classes in a package --> Error: Could not find or load main classCannot start Tomcat 7 as Apache Commons DaemonSetting classpath for JavaHow to replace a file in a zip
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
How to write the following commands in Unix:
- looking for a directory which contains only files with extension:
.class
- looking for a directory which contains only files with extension:
.class
under the path/target/classes/
java maven
New contributor
put on hold as unclear what you're asking by roaima, Prvt_Yadv, teppic, muru, Romeo Ninov yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
How to write the following commands in Unix:
- looking for a directory which contains only files with extension:
.class
- looking for a directory which contains only files with extension:
.class
under the path/target/classes/
java maven
New contributor
put on hold as unclear what you're asking by roaima, Prvt_Yadv, teppic, muru, Romeo Ninov yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
What have you tried so far? Sounds like a homework question without any effort to find an answer by yourself.
– eblock
Apr 8 at 9:01
Unix or Linux? If Unix, what sort? (AIX? HPUX? Something else?)
– roaima
Apr 8 at 13:29
add a comment |
How to write the following commands in Unix:
- looking for a directory which contains only files with extension:
.class
- looking for a directory which contains only files with extension:
.class
under the path/target/classes/
java maven
New contributor
How to write the following commands in Unix:
- looking for a directory which contains only files with extension:
.class
- looking for a directory which contains only files with extension:
.class
under the path/target/classes/
java maven
java maven
New contributor
New contributor
edited Apr 8 at 8:58
fra-san
2,1021721
2,1021721
New contributor
asked Apr 8 at 8:39
user346064user346064
9
9
New contributor
New contributor
put on hold as unclear what you're asking by roaima, Prvt_Yadv, teppic, muru, Romeo Ninov yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as unclear what you're asking by roaima, Prvt_Yadv, teppic, muru, Romeo Ninov yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
What have you tried so far? Sounds like a homework question without any effort to find an answer by yourself.
– eblock
Apr 8 at 9:01
Unix or Linux? If Unix, what sort? (AIX? HPUX? Something else?)
– roaima
Apr 8 at 13:29
add a comment |
3
What have you tried so far? Sounds like a homework question without any effort to find an answer by yourself.
– eblock
Apr 8 at 9:01
Unix or Linux? If Unix, what sort? (AIX? HPUX? Something else?)
– roaima
Apr 8 at 13:29
3
3
What have you tried so far? Sounds like a homework question without any effort to find an answer by yourself.
– eblock
Apr 8 at 9:01
What have you tried so far? Sounds like a homework question without any effort to find an answer by yourself.
– eblock
Apr 8 at 9:01
Unix or Linux? If Unix, what sort? (AIX? HPUX? Something else?)
– roaima
Apr 8 at 13:29
Unix or Linux? If Unix, what sort? (AIX? HPUX? Something else?)
– roaima
Apr 8 at 13:29
add a comment |
1 Answer
1
active
oldest
votes
Not sure if this is the most elegant way, but it will work:
find /target/classes/
-type d
-not -empty
-not -exec sh -c 'find "$1" -maxdepth 1 -type f -print0 | grep -viz ".class$" > /dev/null 2>&1' _ ;
-print
Finds not empty directories.
Within the found directories, if a find
any files that are not named *.class
is empty, print the directory name.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Not sure if this is the most elegant way, but it will work:
find /target/classes/
-type d
-not -empty
-not -exec sh -c 'find "$1" -maxdepth 1 -type f -print0 | grep -viz ".class$" > /dev/null 2>&1' _ ;
-print
Finds not empty directories.
Within the found directories, if a find
any files that are not named *.class
is empty, print the directory name.
add a comment |
Not sure if this is the most elegant way, but it will work:
find /target/classes/
-type d
-not -empty
-not -exec sh -c 'find "$1" -maxdepth 1 -type f -print0 | grep -viz ".class$" > /dev/null 2>&1' _ ;
-print
Finds not empty directories.
Within the found directories, if a find
any files that are not named *.class
is empty, print the directory name.
add a comment |
Not sure if this is the most elegant way, but it will work:
find /target/classes/
-type d
-not -empty
-not -exec sh -c 'find "$1" -maxdepth 1 -type f -print0 | grep -viz ".class$" > /dev/null 2>&1' _ ;
-print
Finds not empty directories.
Within the found directories, if a find
any files that are not named *.class
is empty, print the directory name.
Not sure if this is the most elegant way, but it will work:
find /target/classes/
-type d
-not -empty
-not -exec sh -c 'find "$1" -maxdepth 1 -type f -print0 | grep -viz ".class$" > /dev/null 2>&1' _ ;
-print
Finds not empty directories.
Within the found directories, if a find
any files that are not named *.class
is empty, print the directory name.
answered Apr 8 at 9:05
RoVoRoVo
3,752317
3,752317
add a comment |
add a comment |
3
What have you tried so far? Sounds like a homework question without any effort to find an answer by yourself.
– eblock
Apr 8 at 9:01
Unix or Linux? If Unix, what sort? (AIX? HPUX? Something else?)
– roaima
Apr 8 at 13:29