{"id":636,"date":"2020-09-12T13:27:57","date_gmt":"2020-09-12T18:27:57","guid":{"rendered":"https:\/\/truxgoservers.com\/blog\/?p=636"},"modified":"2020-09-12T13:27:59","modified_gmt":"2020-09-12T18:27:59","slug":"ls-unix-operating-system-command","status":"publish","type":"post","link":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/","title":{"rendered":"ls &#8211; Unix operating system command"},"content":{"rendered":"\n<p>ls (whose translation list) Is a command of the Unix operating system and its derivatives that shows a list of files and directories in a certain directory. The results are listed alphabetically.<\/p>\n\n\n\n<p>Files and directories whose name begins with. (period) are not displayed with the ls instruction, so they are often referred to as &#8220;hidden files.&#8221; The -a option to ls inhibits this behavior, and displays all files and subdirectories, even those beginning with a period. It is one of the most basic tools on Unix operating systems, so it is part of the GNU Coreutils package.<\/p>\n\n\n\n<p>The ls command is very useful to see the files and directories that we have within the directory in which we are and these would be one of these options of the commands that we have present:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ls Commands<\/h2>\n\n\n\n<p><strong><em>\u25b8ls -t:<\/em><\/strong> Sort files by modification date.<\/p>\n\n\n\n<p><strong><em>\u25b8ls -l:<\/em><\/strong> Shows a list in long format, with information on permissions, number of links associated with the file, user, group, size and date of last modification in addition to the name.<\/p>\n\n\n\n<p><strong><em>\u25b8ls -a:<\/em><\/strong> It shows us the files and directories within the current directory, including hidden files and directories.<\/p>\n\n\n\n<p><strong><em>\u25b8ls -s:<\/em><\/strong> Shows the file size in kilobytes before the file name.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/command-ls.png\" alt=\"\" class=\"wp-image-647\" width=\"345\" height=\"238\" srcset=\"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/command-ls.png 728w, https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/command-ls-300x208.png 300w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/figure><\/div>\n\n\n\n<p><strong><em>\u25b8ls -m:<\/em><\/strong> Displays files on one line and separated by commas.<\/p>\n\n\n\n<p><strong><em>\u25b8ls -lh:<\/em><\/strong> It shows the same information as ls -l but with the size units in KB, MB, etc.<\/p>\n\n\n\n<p><strong><em>\u25b8ls -d:<\/em><\/strong> Shows only sthe name of the subdirectory, without entering it or listing the contents.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ls (whose translation list) Is a command of the Unix operating system and its derivatives that shows a list of files and directories in a certain directory. The results are listed alphabetically. Files and directories whose name begins with. (period) are not displayed with the ls instruction, so they are often referred to as &#8220;hidden [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":646,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[94,39,27,132,133],"class_list":["post-636","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-commands","tag-guide","tag-linux","tag-ls","tag-unix"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ls - Unix operating system command - Truxgo Server Blog<\/title>\n<meta name=\"description\" content=\"Command ls mainly to see the files and directories that we have within the directory, and some of the commands that this offers us...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ls - Unix operating system command - Truxgo Server Blog\" \/>\n<meta property=\"og:description\" content=\"Command ls mainly to see the files and directories that we have within the directory, and some of the commands that this offers us...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/\" \/>\n<meta property=\"og:site_name\" content=\"Truxgo Server Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-12T18:27:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-12T18:27:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/efecto-commands.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"712\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Truxgo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Truxgo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/\"},\"author\":{\"name\":\"Truxgo\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/person\\\/8b409c26449db6aa09724b45331e333e\"},\"headline\":\"ls &#8211; Unix operating system command\",\"datePublished\":\"2020-09-12T18:27:57+00:00\",\"dateModified\":\"2020-09-12T18:27:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/\"},\"wordCount\":257,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/efecto-commands.jpg\",\"keywords\":[\"Commands\",\"Guide\",\"Linux\",\"ls\",\"Unix\"],\"articleSection\":[\"Tutorial\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/\",\"name\":\"ls - Unix operating system command - Truxgo Server Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/efecto-commands.jpg\",\"datePublished\":\"2020-09-12T18:27:57+00:00\",\"dateModified\":\"2020-09-12T18:27:59+00:00\",\"description\":\"Command ls mainly to see the files and directories that we have within the directory, and some of the commands that this offers us...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/efecto-commands.jpg\",\"contentUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/efecto-commands.jpg\",\"width\":712,\"height\":350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/ls-unix-operating-system-command\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ls &#8211; Unix operating system command\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/\",\"name\":\"Truxgo Server Blog\",\"description\":\"Cloud Server and Hosting Tutorials.\",\"publisher\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#organization\",\"name\":\"Truxgo Server Blog\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/cropped-truxgo-logo-blanco.png\",\"contentUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/cropped-truxgo-logo-blanco.png\",\"width\":1250,\"height\":278,\"caption\":\"Truxgo Server Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/person\\\/8b409c26449db6aa09724b45331e333e\",\"name\":\"Truxgo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g\",\"caption\":\"Truxgo\"},\"sameAs\":[\"https:\\\/\\\/truxgoservers.com\\\/blog\"],\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/author\\\/truxgo\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ls - Unix operating system command - Truxgo Server Blog","description":"Command ls mainly to see the files and directories that we have within the directory, and some of the commands that this offers us...","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:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/","og_locale":"es_MX","og_type":"article","og_title":"ls - Unix operating system command - Truxgo Server Blog","og_description":"Command ls mainly to see the files and directories that we have within the directory, and some of the commands that this offers us...","og_url":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/","og_site_name":"Truxgo Server Blog","article_published_time":"2020-09-12T18:27:57+00:00","article_modified_time":"2020-09-12T18:27:59+00:00","og_image":[{"width":712,"height":350,"url":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/efecto-commands.jpg","type":"image\/jpeg"}],"author":"Truxgo","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Truxgo","Tiempo de lectura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#article","isPartOf":{"@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/"},"author":{"name":"Truxgo","@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/person\/8b409c26449db6aa09724b45331e333e"},"headline":"ls &#8211; Unix operating system command","datePublished":"2020-09-12T18:27:57+00:00","dateModified":"2020-09-12T18:27:59+00:00","mainEntityOfPage":{"@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/"},"wordCount":257,"commentCount":0,"publisher":{"@id":"https:\/\/truxgoservers.com\/blog\/#organization"},"image":{"@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#primaryimage"},"thumbnailUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/efecto-commands.jpg","keywords":["Commands","Guide","Linux","ls","Unix"],"articleSection":["Tutorial"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/","url":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/","name":"ls - Unix operating system command - Truxgo Server Blog","isPartOf":{"@id":"https:\/\/truxgoservers.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#primaryimage"},"image":{"@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#primaryimage"},"thumbnailUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/efecto-commands.jpg","datePublished":"2020-09-12T18:27:57+00:00","dateModified":"2020-09-12T18:27:59+00:00","description":"Command ls mainly to see the files and directories that we have within the directory, and some of the commands that this offers us...","breadcrumb":{"@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#primaryimage","url":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/efecto-commands.jpg","contentUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/09\/efecto-commands.jpg","width":712,"height":350},{"@type":"BreadcrumbList","@id":"https:\/\/truxgoservers.com\/blog\/ls-unix-operating-system-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truxgoservers.com\/blog\/"},{"@type":"ListItem","position":2,"name":"ls &#8211; Unix operating system command"}]},{"@type":"WebSite","@id":"https:\/\/truxgoservers.com\/blog\/#website","url":"https:\/\/truxgoservers.com\/blog\/","name":"Truxgo Server Blog","description":"Cloud Server and Hosting Tutorials.","publisher":{"@id":"https:\/\/truxgoservers.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truxgoservers.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/truxgoservers.com\/blog\/#organization","name":"Truxgo Server Blog","url":"https:\/\/truxgoservers.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/08\/cropped-truxgo-logo-blanco.png","contentUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/08\/cropped-truxgo-logo-blanco.png","width":1250,"height":278,"caption":"Truxgo Server Blog"},"image":{"@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/person\/8b409c26449db6aa09724b45331e333e","name":"Truxgo","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g","caption":"Truxgo"},"sameAs":["https:\/\/truxgoservers.com\/blog"],"url":"https:\/\/truxgoservers.com\/blog\/author\/truxgo\/"}]}},"_links":{"self":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts\/636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/comments?post=636"}],"version-history":[{"count":3,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts\/636\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts\/636\/revisions\/664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/media\/646"}],"wp:attachment":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/media?parent=636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/categories?post=636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/tags?post=636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}