5
5

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 2014-02-14

随時増えていくかもしれない。

ファイル検索

>dir <検索するファイルの名前> /s

スイッチの前に検索したいファイルの名前を入れる。

参考

指定フォルダのファイルをコンカチ

>for /f %a in ('dir /b path\to\dir') do @type %a >> concat.txt

指定フォルダ以下全てのファイル名出力

>for /f %a in ('dir /b /s path\to\dir') do @echo %a

1行に複数のコマンドを書く

>cd /d D:\ & dir /b

& で繋げられる。

任意の

サイズのファイルを作成する

>fsutil file createnew hoge.txt 1024

>dir hoge.txt
 ドライブ C のボリューム ラベルがありません。
 ボリューム シリアル番号は BA1A-A357 です

2014/02/28  13:07             1,024 hoge.txt
               1 個のファイル               1,024 バイト

fsutil file createnew <ファイル名> <ファイルサイズ> で作成。

ファイルサイズはバイト指定。

ポートが使用されているか確認する

8080ポートが使用されているか確認する場合
>netstat -ano | find "8080"

複数ファイル内文字列検索

> type * | find "検索文字列"

type * でカレントフォルダの全ファイルを対象にして、 | find "検索文字列" で、検索する。

5
5
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
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?