• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

Linux上でファイル名が文字化けする場合があります。

   1  $ ls result.log.*
   2  result.log.Fri
   3  result.log.Thu
   4  result.log.??
   5  result.log.??
   6  result.log.??

こうなると普通にファイル名を指定して操作することができません。

   1  $ wc -l 'result.log.??'
   2  wc: result.log.??: No such file or directory

この場合はlsの出力結果をnkfで変換して正しいファイル名を確認します。

   1  $ ls result.log.* | nkf -e
   2  result.log.Fri
   3  result.log.Thu
   4  result.log.金
   5  result.log.土
   6  result.log.木

確認したファイル名を指定することでファイルが操作できます。

   1  $ wc -l result.log.金
   2  409 result.log.金

posted by Png akanuma on Fri 8 Jun 2012 at 09:12 with 1 comment
Contents
[Linux] ファイル名が文字化けした場合の操作
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ