<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ubuntu on MeerStory</title><link>https://meerstory.com/ja/categories/ubuntu/</link><description>Recent content in Ubuntu on MeerStory</description><generator>Hugo</generator><language>ja-jp</language><lastBuildDate>Sat, 29 Aug 2026 07:24:21 +0900</lastBuildDate><atom:link href="https://meerstory.com/ja/categories/ubuntu/index.xml" rel="self" type="application/rss+xml"/><item><title>Linuxの大容量ファイル閲覧：more vs less コマンドの違いと実務活用法を徹底解説</title><link>https://meerstory.com/ja/ubuntu/20260829_072317_5_more_less_more_less/</link><pubDate>Sat, 29 Aug 2026 07:24:21 +0900</pubDate><guid>https://meerstory.com/ja/ubuntu/20260829_072317_5_more_less_more_less/</guid><description>&lt;h2 id="概要">概要&lt;/h2>
&lt;p>Linux ターミナルで大容量テキストファイルやログを確認する際によく使用される &lt;code>more&lt;/code> と &lt;code>less&lt;/code> コマンドの主な違いを把握します。両コマンドの動作方式とナビゲーション機能を比較し、実務環境に合わせた最適なファイル閲覧方法を解説します。&lt;/p>
&lt;h2 id="1-more-コマンドの基本ページ単位のテキスト閲覧">1. more コマンドの基本：ページ単位のテキスト閲覧&lt;/h2>
&lt;p>&lt;code>more&lt;/code> コマンドの実習に使用するテスト用データファイルを生成するため、&lt;code>seq 1 50 &amp;gt; sample_more.txt&lt;/code> コマンドを実行します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_072317_5_more_less_more_less/captures/s01_c01_seq_1_50___sample_more_txt.png" alt="seq 1 50 &amp;gt; sample_more.txt">&lt;/p>
&lt;p>&lt;code>more&lt;/code> コマンドは、大容量テキストファイルの内容を一度にすべて出力せず、画面単位に分けて順方向に閲覧する際に使用します。&lt;br>
&lt;code>more sample_more.txt&lt;/code> コマンドを実行すると、&lt;code>sample_more.txt&lt;/code> ファイルの最初のページ分のテキストが画面に出力されます。&lt;br>
⚙️ [主なオプション]&lt;/p>
&lt;p>&lt;code>-d&lt;/code> : 誤ったキー入力時に画面下部に案内テキストとヘルプを表示します。&lt;br>
&lt;code>-s&lt;/code> : 連続して表示される複数の空行を1つの空行に圧縮して表示します。&lt;br>
&lt;code>-c&lt;/code> : 画面をスクロールせず、上部から1行ずつ更新しながらテキストを出力します。&lt;br>
&lt;code>-p&lt;/code> : 画面スクロールなしで全画面を消去してからテキスト出力を開始します。&lt;br>
&lt;code>+n&lt;/code> : ファイルの1行目ではなく、指定した n 行目からテキストの閲覧を開始します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_072317_5_more_less_more_less/captures/s01_c02_more_sample_more_txt.png" alt="more sample_more.txt">&lt;/p>
&lt;h2 id="2-less-コマンド의-基本双方向の自由なナビゲーションと大容量ファイル処理">2. less コマンド의 基本：双方向の自由なナビゲーションと大容量ファイル処理&lt;/h2>
&lt;p>&lt;code>less&lt;/code> コマンドの実習に使用する大容量テスト用データファイルを生成するため、&lt;code>seq 1 1000 &amp;gt; sample_less.txt&lt;/code> コ마ンドを実行します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_072317_5_more_less_more_less/captures/s02_c01_seq_1_1000___sample_less_txt.png" alt="seq 1 1000 &amp;gt; sample_less.txt">&lt;/p>
&lt;p>&lt;code>less sample_less.txt&lt;/code> コマンドを実行すると、&lt;code>sample_less.txt&lt;/code> ファイルの最初のページ分のテキストが出力され、キーボードの矢印キーを使用して上下双方向に自由にテキストを移動・閲覧できます。&lt;br>
&lt;code>less&lt;/code> コマンドはファイル全体をメモリに読み込まず、画面に必要な部分だけを順次読み込むため、システムリソースを節約し、大容量ファイルもフリーズすることなく高速に閲覧できます。&lt;/p></description></item><item><title>Linuxの大容量ログをラグなしで1秒で確認！lessコマンド完全活用ガイド</title><link>https://meerstory.com/ja/ubuntu/20260829_071913_4_less_less/</link><pubDate>Sat, 29 Aug 2026 07:19:40 +0900</pubDate><guid>https://meerstory.com/ja/ubuntu/20260829_071913_4_less_less/</guid><description>&lt;h2 id="概要">概要&lt;/h2>
&lt;p>Linux環境で数百メガバイトの大容量ファイルやログを &lt;code>cat&lt;/code> コマンドで開くと、メモリ過負荷やターミナルのラグが発生することがあります。&lt;code>less&lt;/code> コマンドを活用すれば、ファイル全体をメモリにロードせずにページ単位で高速にテキストを閲覧し、効率的に探索することができます。本記事では、Ubuntuターミナルで &lt;code>less&lt;/code> コマンドを活用して長いファイルを閲覧し、キーワードを検索する実践的なTipsを紹介します。&lt;/p>
&lt;h2 id="1-less-コマンドの概要と実習用テストファイルの作成">1. less コマンドの概要と実習用テストファイルの作成&lt;/h2>
&lt;p>&lt;code>less&lt;/code> コマンドの実習を行うため、パッケージリストを最新に更新し、&lt;code>less&lt;/code> パッケージをインストールします。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071913_4_less_less/captures/s01_c01_sudo_apt-get_update_-qq____sudo_apt-get_install_-y.png" alt="sudo apt-get update -qq &amp;amp;&amp;amp; sudo apt-get install -y less">&lt;/p>
&lt;p>&lt;code>less&lt;/code> コマンドによる閲覧を実習するため、1から500までの数字が入力された500行分の &lt;code>sample_log.txt&lt;/code> テストファイルを生成します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071913_4_less_less/captures/s01_c02_seq_1_500___sample_log_txt.png" alt="seq 1 500 &amp;gt; sample_log.txt">&lt;/p>
&lt;p>&lt;code>less&lt;/code> コマンドは、大容量テキストファイルをメモリに一度にロードせず、ページ単位で効率的に閲覧できるビューアです。&lt;br>
&lt;code>less sample_log.txt&lt;/code> コマンドを実行すると、作成した500行のファイル内容をターミナルの画面サイズに合わせてすっきりと確認できます。&lt;br>
⚙️ [主要オプション]&lt;/p>
&lt;p>&lt;code>-N&lt;/code> : 各行の行頭に行番号を表示します。&lt;br>
&lt;code>-S&lt;/code> : 長い文章を自動折り返しせず、水平方向に切り詰めて表示し、左右の矢印キーで移動できます。&lt;br>
&lt;code>-i&lt;/code> : 検索語を入力して閲覧する際、大文字と小文字を区別せずに検索します。&lt;br>
&lt;code>-X&lt;/code> : &lt;code>less&lt;/code> の終了後も、画面にファイルの閲覧内容をそのまま保持します。&lt;br>
&lt;code>-F&lt;/code> : ファイルの全体内容が1画面に収まる場合、&lt;code>less&lt;/code> を起動せずにそのまま内容を出力して終了します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071913_4_less_less/captures/s01_c03_less_sample_log_txt.png" alt="less sample_log.txt">&lt;/p>
&lt;h2 id="2-行番号表示オプションと効率的なページ移動ショートカット">2. 行番号表示オプションと効率的なページ移動ショートカット&lt;/h2>
&lt;p>&lt;code>less&lt;/code> コマンドの実習のため、1000から2000までの連続した数字が含まれる &lt;code>system_events.log&lt;/code> サンプルログファイルを生成します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071913_4_less_less/captures/s02_c01_seq_1000_2000___system_events_log.png" alt="seq 1000 2000 &amp;gt; system_events.log">&lt;/p>
&lt;p>&lt;code>less -N system_events.log&lt;/code> コマンドを実行すると、ファイルの各行の行頭に行番号が表示され、ログ内の位置を正確に把握できます。&lt;br>
閲覧中、スペースキーで1ページ下へ移動、&lt;code>Enter&lt;/code> キーで1行下へ移動、&lt;code>g&lt;/code> キーでファイルの最上部（最初の行）へ移動、&lt;code>G&lt;/code> キーでファイルの最下部（最後の行）へ即座に移動でき、大容量ログもラグなしで効率的に探索できます。&lt;/p></description></item><item><title>Linux catコマンド完全ガイド - ターミナルでのファイル閲覧から結合・作成のテクニックまで！</title><link>https://meerstory.com/ja/ubuntu/20260829_071443_3_cat_cat/</link><pubDate>Sat, 29 Aug 2026 07:14:59 +0900</pubDate><guid>https://meerstory.com/ja/ubuntu/20260829_071443_3_cat_cat/</guid><description>&lt;h2 id="概要">概要&lt;/h2>
&lt;p>LinuxおよびUbuntuターミナルで最も広く使われている &lt;code>cat&lt;/code> コマンドの基礎から実務での応用まで完全にまとめます。単にファイル内容を出力する機能以外にも、行番号表示、空白の可視化、ファイルの結合およびEOF（Heredoc）を活用したファイル作成方法まで例とともに紹介します。&lt;/p>
&lt;h2 id="1-catコマンドの基本使用法とテキストファイル内容の即時確認">1. catコマンドの基本使用法とテキストファイル内容の即時確認&lt;/h2>
&lt;p>&lt;code>cat&lt;/code> コマンドの実習に使用するサンプルテキストファイルを生成するために、&lt;code>echo &amp;quot;Hello Ubuntu 24.04 LTS World!&amp;quot; &amp;gt; sample.txt&lt;/code> コマンドを実行します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071443_3_cat_cat/captures/s01_c01_echo__Hello_Ubuntu_24_04_LTS_World_____sample_txt.png" alt="echo “Hello Ubuntu 24.04 LTS World!” &amp;gt; sample.txt">&lt;/p>
&lt;p>&lt;code>cat&lt;/code> コマンドは指定したテキストファイルの全内容をターミナル画面に出力します。&lt;br>
&lt;code>cat sample.txt&lt;/code> コマンドを実行すると、ファイルに作成された内容が画面にすぐに表示されます。&lt;br>
⚙️ [主なオプション]&lt;/p>
&lt;p>&lt;code>-n&lt;/code> : すべての出力行に行番号を付けて表示します。&lt;br>
&lt;code>-b&lt;/code> : 空白以外の行にのみ行番号を付けて表示します。&lt;br>
&lt;code>-s&lt;/code> : 連続する空行を1つの空行に圧縮して出力します。&lt;br>
&lt;code>-E&lt;/code> : 各行の末尾に &lt;code>$&lt;/code> 文字を表示して改行位置を可視化します。&lt;br>
&lt;code>-T&lt;/code> : タブ（TAB）文字を &lt;code>^I&lt;/code> に変換して表示します。&lt;br>
&lt;code>-A&lt;/code> : タブ、改行、制御文字をすべて含めてファイル内部のすべての要素を可視化します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071443_3_cat_cat/captures/s01_c02_cat_sample_txt.png" alt="cat sample.txt">&lt;/p>
&lt;h2 id="2-行番号表示-nおよび特殊文字の可視化-aオプション活用法">2. 行番号表示(-n)および特殊文字の可視化(-A)オプション活用法&lt;/h2>
&lt;p>&lt;code>cat&lt;/code> コマンドのオプション実習のためのサンプルファイルを準備するために、&lt;code>echo -e &amp;quot;First Line\nSecond Line\n\nFourth Line\tTabbed&amp;quot; &amp;gt; options_demo.txt&lt;/code> コマンドを実行します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071443_3_cat_cat/captures/s02_c01_echo_-e__First_Line_nSecond_Line_n_nFourth_Line_tT.png" alt="echo -e “First Line\nSecond Line\n\nFourth Line\tTabbed” &amp;gt; options_demo.txt">&lt;/p></description></item><item><title>Ubuntu ls コマンドオプション完全ガイド - ファイル一覧を見やすく整理する必須テクニック 5選</title><link>https://meerstory.com/ja/ubuntu/20260829_071032_2_ls_ls/</link><pubDate>Sat, 29 Aug 2026 07:11:01 +0900</pubDate><guid>https://meerstory.com/ja/ubuntu/20260829_071032_2_ls_ls/</guid><description>&lt;h2 id="概要">概要&lt;/h2>
&lt;p>LinuxおよびUbuntu環境において最も基本となる &lt;code>ls&lt;/code> コマンドの核心オプションと活用法をご紹介します。単にファイル名を列挙するにとどまらず、ファイルの詳細情報、容量単位での表示、非表示ファイル（ドットファイル）の確認、並び替えテクニックまで、実務で即座に活用できるファイル整理のノウハウを解説します。&lt;/p>
&lt;h2 id="1-基本的なファイル一覧の表示と非表示ファイルおよび詳細権限の確認-ls--l-ls--al">1. 基本的なファイル一覧の表示と非表示ファイルおよび詳細権限の確認 (ls -l, ls -al)&lt;/h2>
&lt;p>&lt;code>ls&lt;/code> コマンドの実習を行う専用スペースを作成して移動し、通常ファイルと非表示ファイルを準備するために &lt;code>mkdir -p ~/ls_demo &amp;amp;&amp;amp; cd ~/ls_demo &amp;amp;&amp;amp; touch file1.txt file2.log .hidden_config&lt;/code> コマンドを実行します。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071032_2_ls_ls/captures/s01_c01_mkdir_-p___ls_demo____cd___ls_demo____touch_file1.png" alt="mkdir -p ~/ls_demo &amp;amp;&amp;amp; cd ~/ls_demo &amp;amp;&amp;amp; touch file1.txt file2.log .hidden_config">&lt;/p>
&lt;p>&lt;code>ls -l&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_071032_2_ls_ls/captures/s01_c02_ls_-l.png" alt="ls -l">&lt;/p>
&lt;p>&lt;code>ls -al&lt;/code> コマンドは、&lt;code>-a&lt;/code> オプションと &lt;code>-l&lt;/code> オプションを組み合わせて、非表示ファイルを含むすべての項目の詳細情報を出力します。&lt;br>
これにより、デフォルトの一覧表示では表示されなかった &lt;code>.hidden_config&lt;/code> ファイルの権限や所有者情報を一目で確認できます。&lt;/p>
&lt;p>&lt;img src="https://meerstory.com/ubuntu/20260829_071032_2_ls_ls/captures/s01_c03_ls_-al.png" alt="ls -al">&lt;/p>
&lt;h2 id="2-人が読みやすい容量単位の表記およびファイルサイズ順の並び替え-ls--lh-ls--lhs">2. 人が読みやすい容量単位の表記およびファイルサイズ順の並び替え (ls -lh, ls -lhS)&lt;/h2>
&lt;p>ファイルサイズの比較および並び替えの実習のため、1MBと5MBの容量のサンプルファイルを生成する &lt;code>truncate -s 1M ~/ls_demo/sample_1m.bin &amp;amp;&amp;amp; truncate -s 5M ~/ls_demo/sample_5m.bin&lt;/code> コマンドを実行します。&lt;/p></description></item><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>