5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ソースファイルの総行数の数え方

Last updated at Posted at 2012-04-23
.javaで終わるファイルの総行数
$ find . -name "*.java" | xargs wc -l

こうすると↓こんな感じでカレントディレクトリ以下のディレクトリで
".java"で終わるファイルの行数を足すと何行あるかをカウントできる。

...
     220 src/org/apache/tomcat/util/net/NioChannel.java
    2399 src/org/apache/tomcat/util/net/NioEndpoint.java
     302 src/org/apache/tomcat/util/net/NioSelectorPool.java
     692 src/org/apache/tomcat/util/net/PoolTcpEndpoint.java
     488 src/org/apache/tomcat/util/net/SecureNioChannel.java
     173 src/org/apache/tomcat/util/net/ServerSocketFactory.java
     384 src/org/apache/tomcat/util/net/SocketProperties.java
      27 src/org/apache/tomcat/util/net/SocketStatus.java
      93 src/org/apache/tomcat/util/net/SSLImplementation.java
     130 src/org/apache/tomcat/util/net/SSLSupport.java
     110 src/org/apache/tomcat/util/net/TcpConnection.java
      66 src/org/apache/tomcat/util/net/TcpConnectionHandler.java
     732 src/org/apache/tomcat/util/net/URL.java
     196 src/org/apache/tomcat/util/res/StringManager.java
     844 src/org/apache/tomcat/util/threads/ThreadPool.java
      39 src/org/apache/tomcat/util/threads/ThreadPoolRunnable.java
     102 src/org/apache/tomcat/util/threads/ThreadWithAttributes.java
  327933 total
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?