0
0

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 1 year has passed since last update.

【Linux】lsコマンドでファイルのみを表示する方法

Posted at

ファイルのみを出力する

ls -F [パス] | grep -v /

隠しファイルも含めて表示

ls -aF [パス] | grep -v /

サンプル

$ ls -F path/to/sample | grep -v /
Gemfile
Gemfile.lock
Guardfile
README.md
Rakefile
compose.yml
config.ru
lefthook-local.yml
lefthook.yml
package-lock.json
package.json
typescript

$ ls -aF | grep -v /
.DS_Store
.dockerignore
.editorconfig
.env
.git-lint.yml
.gitattributes
.gitignore
.rspec
.rubocop.yml
.ruby-version
.solargraph.yml
Gemfile
Gemfile.lock
Guardfile
README.md
Rakefile
compose.yml
config.ru
lefthook-local.yml
lefthook.yml
package-lock.json
package.json
typescript
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?