<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lsコマンド on MeerStory</title><link>https://meerstory.com/ja/tags/ls%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/</link><description>Recent content in Lsコマンド on MeerStory</description><generator>Hugo</generator><language>ja-jp</language><lastBuildDate>Sat, 29 Aug 2026 07:06:42 +0900</lastBuildDate><atom:link href="https://meerstory.com/ja/tags/ls%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/index.xml" rel="self" type="application/rss+xml"/><item><title>Ubuntu必須コマンド ls -al：Linuxの隠しファイルと権限を完全マスター！</title><link>https://meerstory.com/ja/ubuntu/20260829_070614_1_ls_al_ls/</link><pubDate>Sat, 29 Aug 2026 07:06:42 +0900</pubDate><guid>https://meerstory.com/ja/ubuntu/20260829_070614_1_ls_al_ls/</guid><description>&lt;h2 id="概要">概要&lt;/h2>
&lt;p>LinuxおよびUbuntuのターミナル環境において、最も基本でありながら重要なコマンドは、ファイルやディレクトリを一覧表示する &lt;code>ls&lt;/code> です。本記事では、&lt;code>ls -al&lt;/code> オプションを活用して、ファイルの権限、所有者、그리고ドット（.）で始まる隠しファイルまで一目で確認する方法を、実践的な例とともに詳しく解説します。&lt;/p>
&lt;h2 id="1-ls-の基本使用法および詳細情報の確認-ls-ls--l">1. ls の基本使用法および詳細情報の確認 (ls, ls -l)&lt;/h2>
&lt;p>&lt;code>ls&lt;/code> コマンドの実習用ディレクトリを作成して移動するために、&lt;code>mkdir -p ~/ls_demo &amp;amp;&amp;amp; cd ~/ls_demo&lt;/code> コマンドを実行します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_070614_1_ls_al_ls/captures/s01_c01_mkdir_-p___ls_demo____cd___ls_demo.png" alt="mkdir -p ~/ls_demo &amp;amp;&amp;amp; cd ~/ls_demo">&lt;/p>
&lt;p>実習に必要なサンプルファイルを準備するために、&lt;code>touch file1.txt file2.txt&lt;/code> コマンドで空のファイルを作成します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_070614_1_ls_al_ls/captures/s01_c02_touch_file1_txt_file2_txt.png" alt="touch file1.txt file2.txt">&lt;/p>
&lt;p>&lt;code>ls&lt;/code> コマンドは、カレントディレクトリのファイルおよびディレクトリの一覧を表示します。&lt;br>
⚙️ [主なオプション]&lt;/p>
&lt;p>&lt;code>-a&lt;/code> : ドット（.）で始まる隠しファイルやディレクトリを含め、すべての項目を表示します。&lt;br>
&lt;code>-l&lt;/code> : ファイルの権限、所有者、ファイルサイズなどの詳細情報を表示します。&lt;br>
&lt;code>-h&lt;/code> : ファイルサイズを人が読みやすい単位（KB、MB、GB）で表示します。&lt;br>
&lt;code>-t&lt;/code> : 最近変更されたファイルから時間順にソートして表示します。&lt;br>
&lt;code>-S&lt;/code> : ファイルサイズが大きい順にソートして一覧を表示します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_070614_1_ls_al_ls/captures/s01_c03_ls.png" alt="ls">&lt;/p>
&lt;p>&lt;code>ls -l&lt;/code> コマンドは、ファイルの権限、所有者、サイズ、変更日時など、各項目の詳細情報をリスト形式で表示します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_070614_1_ls_al_ls/captures/s01_c04_ls_-l.png" alt="ls -l">&lt;/p>
&lt;h2 id="2-隠しファイルと隠しディレクトリを含む全体の表示-ls--a-ls--al">2. 隠しファイルと隠しディレクトリを含む全体の表示 (ls -a, ls -al)&lt;/h2>
&lt;p>隠しファイルの実習を行うため、ファイル名の先頭にドット（&lt;code>.&lt;/code>）が付いた &lt;code>.hidden_file&lt;/code> という空のファイルを作成する &lt;code>touch ~/ls_demo/.hidden_file&lt;/code> コマンドを実行します。&lt;/p></description></item></channel></rss>