拡張子のみ[重複]のすべてのファイルとフォルダを一覧表示

拡張子のみ[重複]のすべてのファイルとフォルダを一覧表示

などの拡張子のみを持つすべてのファイルとフォルダを一覧表示したいと思います.bashrc.cache/これは簡単なはずです。これを試してみると、ls .*期待した結果は得られません。

jacob@jacob-Precision-Tower-3620:/home/jacob$ ls .*
.bash_history  .bash_logout  .bashrc  .ICEauthority  .profile

.:
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos

..:
jacob  lost+found

.cache:
event-sound-cache.tdb.d35b7efbc4794c7998a81437c01c41ec.x86_64-pc-linux-gnu  evolution  fontconfig  gnome-getting-started-docs  gnome-software  gstreamer-1.0  ibus  logrotate  media-art  thumbnails  totem  tracker  update-manager-core  upstart  yelp

.config:
dconf  evolution  gnome-session  goa-1.0  gtk-3.0  ibus  libaccounts-glib  nautilus  parcellite  pulse  totem  update-notifier  upstart  user-dirs.dirs  user-dirs.locale  yelp

.gconf:

.gnupg:
private-keys-v1.d  S.gpg-agent

.local:
share

.nano:

.nv:
GLCache```

ベストアンサー1

ls -A、を使って隠しファイルを表示できます。ただし、使用中のファイルを含めるには、.および:を使用できません。..ls -a

あなたの場合:*シェルによって拡張されるため、lsいくつかのファイルといくつかのディレクトリが表示されます。ディレクトリを引数として指定すると、そのディレクトリにあるファイルが一覧表示されます。ls -d *引数のディレクトリにあるファイルを一覧表示する代わりに、forceを使用して引数のファイルを一覧表示できます。注:(一部の形式の場合)とはls -d .*大きく異なりません。echo .*

おすすめ記事