Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
1つのコマンドで、現在の作業ディレクトリの最後の5つの隠しディレクトリの内容を一覧表示するように求められました。私はこのような何かが仕事をするだろうと思いました:
ls -a -1 | grep "^\." | tail -n 5 | ls
ただし、最後の5つのディレクトリの名前が一覧表示されるだけです。コンテンツを一覧表示するにはどうすればよいですか。
ls -a -1 | grep "^\." | tail -n 5 | xargs ls