<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takuya_1st</author_name>
  <author_url>https://blog.hatena.ne.jp/takuya_1st/</author_url>
  <blog_title>それマグで！</blog_title>
  <blog_url>https://takuya-1st.hatenablog.jp/</blog_url>
  <categories>
    <anon>linux</anon>
    <anon>bash</anon>
  </categories>
  <description>ディレクトリだけをls する、ファイルだけをls する ディレクトリ中のディレクトリだけを調べたい。 自分自身のディレクトリに限定 これは、指定したパスがディレクトリのときだけ応答される。 ls -d /var ワイルドカードと組み合わせ ワイルドカードで指定したうえで、末尾にスラッシュをつけておけば、ディレクトリを取り出せる。上記のディレクトリに限定する ls を使えば、ディレクトリだけを取り出せる。 ls -d /var/*/ 別解：パスにして、スラッシュでgrep 一番簡単かもしれない。パスで表示してgrep で 末尾のスラッシュに限定する。 ls -F | grep -E '/$' -…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2022%2F12%2F26%2F175644&quot; title=&quot;ディレクトリだけをls する、ファイルだけをls するの逆 - それマグで！&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/t/takuya_1st/20221226/20221226175548.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-12-26 17:56:44</published>
  <title>ディレクトリだけをls する、ファイルだけをls するの逆</title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/2022/12/26/175644</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
