{"id":59105,"date":"2023-09-04T15:01:27","date_gmt":"2023-09-04T07:01:27","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=59105"},"modified":"2023-09-12T17:26:02","modified_gmt":"2023-09-12T09:26:02","slug":"linux-command-ls","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/","title":{"rendered":"How to List Files and Folders in Linux"},"content":{"rendered":"<p>The <code>ls<\/code> Linux command is used to list files and directories in the current directory. When you type <code>ls<\/code> and press Enter in the terminal, it will display all the files and folders in the directory you are currently in. It\u2019s a fundamental command that helps users navigate and manage their file system by providing an overview of the contents.<\/p>\n<p>You can also use various options with the <code>ls<\/code> command to view additional details, such as file permissions, ownership, file size, and modification dates. In this post, we explore all possible uses of the <code>ls<\/code> command.<\/p>\n<p>General syntax for <code>ls<\/code> command:<\/p>\n<pre>\r\n$ ls [OPTION...] [FILE...]\r\n<\/pre>\n<hr>\n<h3>1. Display hidden files<\/h3>\n<pre>ls -a<\/pre>\n<p>This option will display the entire list of directories, including hidden files. Hidden files start with a dot (.)<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre>.  ..  .config  .bashrc  file1.txt  folder1  .hiddenfolder  picture.jpg<\/pre>\n<p>In this example, the single dot (<code>.<\/code>) represents the current directory, and the double dot (<code>..<\/code>) represents the parent directory. The <code>.config <\/code>and <code>.bashrc<\/code> files, along with the <code>.hiddenfolder<\/code>, are hidden files and directories that would not be shown with the plain <code>ls<\/code> command but are displayed here because of the <code>-a<\/code> option. The other items are regular, non-hidden files and directories.<\/p>\n<hr>\n<h3>2. Sorting by file size<\/h3>\n<pre>ls -S<\/pre>\n<p>Use the <code>ls -S<\/code> command to sort files and directories by size in descending order, and then print them to the terminal.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre>file_large.mp4\r\nimage1.jpg\r\ndocument.pdf\r\ntextfile.txt\r\nfolder1\/\r\nfolder2\/\r\n<\/pre>\n<p>In this example, <code>file_large.mp4<\/code> is the largest file, and <code>textfile.tx<\/code>t is the smallest file. The directories <code>folder1\/<\/code> and <code>folder2\/ <\/code>are also listed, but the <code>-S<\/code> option doesn\u2019t consider their sizes in the sorting. If you want to see the sizes along with the files, you can combine the <code>-S<\/code> option with the <code>-l <\/code>option, like ls <code>-lS<\/code>.<\/p>\n<hr>\n<h3>3. Display files in long format<\/h3>\n<pre>ls -l<\/pre>\n<p>The <code>-l<\/code> option displays the contents of the directory in a more detailed way. Displaying the file\u2019s owner and group, last modified time, and more.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre>total 48\r\ndrwxr-xr-x 5 user user 4096 Aug  6 10:30 Documents\r\n-rw-r--r-- 1 user user  123 Aug  6 10:20 file.txt\r\ndrwxr-xr-x 2 user user 4096 Aug  6 10:15 Music\r\n-rwxr-xr-x 1 user user 2048 Aug  6 10:10 script.sh\r\ndrwxr-xr-x 3 user user 4096 Aug  6 10:05 Pictures\r\n<\/pre>\n<p>Here\u2019s a breakdown of what each part means:<\/p>\n<ul>\n<li><code>drwxr-xr-x<\/code>: The file permissions (e.g., <code>d<\/code> indicates a directory, <code>rwx<\/code> means read, write, and execute permissions for the owner).<\/li>\n<li><code>5<\/code>: The number of hard links to the file or directory.<\/li>\n<li><code>user<\/code>: The owner of the file or directory (listed twice, once for the owner and once for the group).<\/li>\n<li><code>4096<\/code>: The file size in bytes.<\/li>\n<li><code>Aug 6 10:30<\/code>: The date and time the file or directory was last modified.<\/li>\n<li><code>Documents<\/code>: The name of the file or directory.<\/li>\n<\/ul>\n<hr>\n<h3>4. Sort by date and time<\/h3>\n<pre>ls -t<\/pre>\n<p>This command sorts files by last modified time. The most recently edited files will appear at the top of the output, making them easy to find.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre>report.txt  image.png  project\/  notes.docx  old_data.csv<\/pre>\n<p>In this example, <code>report.txt<\/code> is the most recently modified file, while <code>old_data.csv<\/code> is the oldest. If you were to run the command in a different directory or at a different time, the output would vary based on the files and their modification times in that specific directory.<\/p>\n<hr>\n<h3>5. Display only directories<\/h3>\n<pre>ls -d *\/<\/pre>\n<p>Use this command to list the sub-directories excluding all other files.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Here\u2019s a sample output for the command, assuming you have three directories named <code>Documents<\/code>, <code>Pictures<\/code>, and <code>Music<\/code> in the current directory:<\/p>\n<pre>Documents\/  Pictures\/  Music\/<\/pre>\n<p>Each directory name is followed by a slash (<code>\/<\/code>), indicating that it is a directory.<\/p>\n<hr>\n<h3>6. List files and save results to a file<\/h3>\n<pre>ls > [filename]<\/pre>\n<p>The <code>ls > [filename]<\/code> command allows you to save the output of the preceding command to a file.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>The command <code>ls > filename.txt<\/code> doesn\u2019t display any output in the terminal. Instead, it redirects the output of the <code>ls<\/code> command to a file named <code>filename.txt<\/code>.<\/p>\n<p>If you were to run the <code>ls<\/code> command in a directory containing files and folders, the names of those files and folders would be written to <code>filename.txt<\/code>. You wouldn\u2019t see anything in the terminal itself.<\/p>\n<p>Here\u2019s an example of what might be inside <code>filename.txt<\/code> if the directory contained three files and one folder:<\/p>\n<pre>file1.txt\r\nfile2.jpg\r\nfolder1\r\nfile3.pdf\r\n<\/pre>\n<p>The exact contents would depend on the files and directories present in the current directory where the command was run.<\/p>\n<hr>\n<h3>7. List file owners with their ID<\/h3>\n<pre>ls -n<\/pre>\n<p>This option displays the owner and group as <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/mtxserv.com\/vps-server\/doc\/how-to-find-the-uid-or-gid-of-a-linux-user\">UID<\/a> and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/mtxserv.com\/vps-server\/doc\/how-to-find-the-uid-or-gid-of-a-linux-user\">GID<\/a>.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre>drwxr-xr-x 2 1001 1001 4096 Apr  1 12:34 directory1\r\n-rw-r--r-- 1 1001 1001    0 Apr  1 12:34 file1.txt\r\n-rwxr-xr-x 1 1002 1002  123 Apr  1 12:34 script.sh\r\n<\/pre>\n<p>In this example, the first column shows the file permissions, the second column shows the number of hard links, the third and fourth columns show the user and group IDs, the fifth column shows the file size in bytes, and the sixth and seventh columns show the date and time of the last modification. The last column shows the name of the file or directory.<\/p>\n<hr>\n<h3 style=\"padding-bottom:10px\">More Linux commands:<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"150\">Directory Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rm-rmdir\/\"><code>rmdir<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cd\/\"><code>cd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-pwd\/\"><code>pwd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-exa\/\"><code>exa<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\"><code>ls<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cat\/\"><code>cat<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/\"><code>cp<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-dd\/\"><code>dd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-less\/\"><code>less<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-touch\/\"><code>touch<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ln\/\"><code>ln<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rename\/\"><code>rename<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-more\/\"><code>more<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-head\/\"><code>head<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File System Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-chown\/\"><code>chown<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mkfs\/\"><code>mkfs<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-locate\/\"><code>locate<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Networking<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\"><code>ping<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-curl\/\"><code>curl<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-wget\/\"><code>wget<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-iptables\/\"><code>iptables<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mtr\/\"><code>mtr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Search and Text Processing<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-find\/\"><code>find<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-grep\/\"><code>grep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sed\/\"><code>sed<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-whatis\/\"><code>whatis<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ripgrep\/\"><code>ripgrep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-fd\/\"><code>fd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tldr\/\"><code>tldr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">System Information and Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-env\/\"><code>env<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\"><code>history<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-top\/\"><code>top<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-who\/\"><code>who<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-htop\/\"><code>htop<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-glances\/\"><code>glances<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-lsof\/\"><code>lsof<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">User and Session Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\"><code>screen<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-su\/\"><code>su<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sudo\/\"><code>sudo<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-open\/\"><code>open<\/code><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>Understand the power of the &#8216;ls&#8217; command for efficient file management.<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[888,3316],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to List Files and Folders in Linux - Hongkiat<\/title>\n<meta name=\"description\" content=\"Understand the power of the &#039;ls&#039; command for efficient file management.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to List Files and Folders in Linux\" \/>\n<meta property=\"og:description\" content=\"Understand the power of the &#039;ls&#039; command for efficient file management.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-04T07:01:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-12T09:26:02+00:00\" \/>\n<meta name=\"author\" content=\"Hongkiat.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hongkiat.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/\"},\"author\":{\"name\":\"Hongkiat.com\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\"},\"headline\":\"How to List Files and Folders in Linux\",\"datePublished\":\"2023-09-04T07:01:27+00:00\",\"dateModified\":\"2023-09-12T09:26:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/\"},\"wordCount\":696,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"Linux\",\"Linux Commands\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/\",\"name\":\"How to List Files and Folders in Linux - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-09-04T07:01:27+00:00\",\"dateModified\":\"2023-09-12T09:26:02+00:00\",\"description\":\"Understand the power of the 'ls' command for efficient file management.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ls\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to List Files and Folders in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\",\"name\":\"Hongkiat.com\",\"description\":\"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to List Files and Folders in Linux - Hongkiat","description":"Understand the power of the 'ls' command for efficient file management.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/","og_locale":"en_US","og_type":"article","og_title":"How to List Files and Folders in Linux","og_description":"Understand the power of the 'ls' command for efficient file management.","og_url":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2023-09-04T07:01:27+00:00","article_modified_time":"2023-09-12T09:26:02+00:00","author":"Hongkiat.com","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat.com","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/"},"author":{"name":"Hongkiat.com","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3"},"headline":"How to List Files and Folders in Linux","datePublished":"2023-09-04T07:01:27+00:00","dateModified":"2023-09-12T09:26:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/"},"wordCount":696,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["Linux","Linux Commands"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/","url":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/","name":"How to List Files and Folders in Linux - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2023-09-04T07:01:27+00:00","dateModified":"2023-09-12T09:26:02+00:00","description":"Understand the power of the 'ls' command for efficient file management.","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to List Files and Folders in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3","name":"Hongkiat.com","description":"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/com\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-fnj","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=59105"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59105\/revisions"}],"predecessor-version":[{"id":69248,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59105\/revisions\/69248"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=59105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=59105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=59105"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=59105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}