{"id":834,"date":"2012-09-17T05:02:19","date_gmt":"2012-09-17T11:02:19","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=834"},"modified":"2018-10-04T03:43:52","modified_gmt":"2018-10-04T09:43:52","slug":"alternative-to-ls-command","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/","title":{"rendered":"Alternative to &#8220;ls&#8221; command"},"content":{"rendered":"<p>ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of &#8220;ls&#8221; command. The Answer is &#8220;YES&#8221;<\/p>\n<blockquote><p>echo does ls<\/p><\/blockquote>\n<p><!--more--><\/p>\n<p>echo command is mostly used to display a line of text . echo can list out a directory much like the ls command.<\/p>\n<blockquote><p>[root@server \/]# echo *<\/p><\/blockquote>\n<p>bin boot dev etc home lib media mine mnt opt proc root sbin selinux srv sys tmp usr var<\/p>\n<p>echo command doesn&#8217;t output any of the file description labels. The real ls command won&#8217;t display the file description labels either. These description labels appears due to aliases passed to ls.<br \/>\n<strong>Real World Uses<\/strong><br \/>\nSometimes system crash or drives dying can bring systems down to the point where filesystem get corrupted that they are unable to mount. In this scenario, the only way to see the system files is to use echo for displaying the files and directories.<br \/>\nHere are some examples where echo might be used within scripts.<br \/>\nA variable definition:<\/p>\n<blockquote><p>display=`echo *`To pass files through a loop:<br \/>\nfor $display in `echo *`<br \/>\ndo<br \/>\nsource<br \/>\ndone<\/p><\/blockquote>\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n<p style=\"text-align: center;\"><!--HubSpot Call-to-Action Code --><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><!-- [if lte IE 8]><\/p>\n\n\n\n\n\n<div id=\"hs-cta-ie-element\"><\/div>\n\n\n<![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><img decoding=\"async\" id=\"hs-cta-img-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\" alt=\"Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value\" \/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '9d590242-d641-4383-94b4-8cfd62f0af6b', {}); <\/script><\/span><!-- end HubSpot Call-to-Action Code --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-834","post","type-post","status-publish","format-standard","hentry","category-miscellaneous"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of &quot;ls&quot; command. The Answer is &quot;YES&quot; echo does ls echo command is mostly used to display a line of text . echo can\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"SupportPRO Admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Server Management Tips | SupportPRO Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Alternative to \u201cls\u201d command | Server Management Tips\" \/>\n\t\t<meta property=\"og:description\" content=\"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of &quot;ls&quot; command. The Answer is &quot;YES&quot; echo does ls echo command is mostly used to display a line of text . echo can\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2012-09-17T11:02:19+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-10-04T09:43:52+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Alternative to \u201cls\u201d command | Server Management Tips\" \/>\n\t\t<meta name=\"twitter:description\" content=\"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of &quot;ls&quot; command. The Answer is &quot;YES&quot; echo does ls echo command is mostly used to display a line of text . echo can\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#article\",\"name\":\"Alternative to \\u201cls\\u201d command | Server Management Tips\",\"headline\":\"Alternative to &#8220;ls&#8221; command\",\"author\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/no-cache.hubspot.com\\\/cta\\\/default\\\/2725694\\\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#articleImage\"},\"datePublished\":\"2012-09-17T05:02:19-06:00\",\"dateModified\":\"2018-10-04T03:43:52-06:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#webpage\"},\"articleSection\":\"Miscellaneous\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.supportpro.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/#listItem\",\"name\":\"Miscellaneous\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/#listItem\",\"position\":2,\"name\":\"Miscellaneous\",\"item\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#listItem\",\"name\":\"Alternative to &#8220;ls&#8221; command\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#listItem\",\"position\":3,\"name\":\"Alternative to &#8220;ls&#8221; command\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/#listItem\",\"name\":\"Miscellaneous\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\",\"name\":\"SupportPRO\",\"description\":\"SupportPRO Blog\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/\",\"telephone\":\"+18476076123\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/\",\"name\":\"SupportPRO Admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13d2f63048d631e03a432375448be5eb7861069df4fef10f0cb1c7b36554c225?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"SupportPRO Admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#webpage\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/\",\"name\":\"Alternative to \\u201cls\\u201d command | Server Management Tips\",\"description\":\"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of \\\"ls\\\" command. The Answer is \\\"YES\\\" echo does ls echo command is mostly used to display a line of text . echo can\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/alternative-to-ls-command\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"datePublished\":\"2012-09-17T05:02:19-06:00\",\"dateModified\":\"2018-10-04T03:43:52-06:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/\",\"name\":\"Server Management Tips\",\"description\":\"SupportPRO Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Alternative to \u201cls\u201d command | Server Management Tips<\/title>\n\n","aioseo_head_json":{"title":"Alternative to \u201cls\u201d command | Server Management Tips","description":"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of \"ls\" command. The Answer is \"YES\" echo does ls echo command is mostly used to display a line of text . echo can","canonical_url":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#article","name":"Alternative to \u201cls\u201d command | Server Management Tips","headline":"Alternative to &#8220;ls&#8221; command","author":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"publisher":{"@id":"https:\/\/www.supportpro.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png","@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#articleImage"},"datePublished":"2012-09-17T05:02:19-06:00","dateModified":"2018-10-04T03:43:52-06:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#webpage"},"isPartOf":{"@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#webpage"},"articleSection":"Miscellaneous"},{"@type":"BreadcrumbList","@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.supportpro.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/#listItem","name":"Miscellaneous"}},{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/#listItem","position":2,"name":"Miscellaneous","item":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#listItem","name":"Alternative to &#8220;ls&#8221; command"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#listItem","position":3,"name":"Alternative to &#8220;ls&#8221; command","previousItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/#listItem","name":"Miscellaneous"}}]},{"@type":"Organization","@id":"https:\/\/www.supportpro.com\/blog\/#organization","name":"SupportPRO","description":"SupportPRO Blog","url":"https:\/\/www.supportpro.com\/blog\/","telephone":"+18476076123"},{"@type":"Person","@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author","url":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/","name":"SupportPRO Admin","image":{"@type":"ImageObject","@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/13d2f63048d631e03a432375448be5eb7861069df4fef10f0cb1c7b36554c225?s=96&d=mm&r=g","width":96,"height":96,"caption":"SupportPRO Admin"}},{"@type":"WebPage","@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#webpage","url":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/","name":"Alternative to \u201cls\u201d command | Server Management Tips","description":"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of \"ls\" command. The Answer is \"YES\" echo does ls echo command is mostly used to display a line of text . echo can","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.supportpro.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/#breadcrumblist"},"author":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"creator":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"datePublished":"2012-09-17T05:02:19-06:00","dateModified":"2018-10-04T03:43:52-06:00"},{"@type":"WebSite","@id":"https:\/\/www.supportpro.com\/blog\/#website","url":"https:\/\/www.supportpro.com\/blog\/","name":"Server Management Tips","description":"SupportPRO Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.supportpro.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Server Management Tips | SupportPRO Blog","og:type":"article","og:title":"Alternative to \u201cls\u201d command | Server Management Tips","og:description":"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of &quot;ls&quot; command. The Answer is &quot;YES&quot; echo does ls echo command is mostly used to display a line of text . echo can","og:url":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/","article:published_time":"2012-09-17T11:02:19+00:00","article:modified_time":"2018-10-04T09:43:52+00:00","twitter:card":"summary","twitter:title":"Alternative to \u201cls\u201d command | Server Management Tips","twitter:description":"ls command will surely be one of the most used command while working with Linux command line. Think of a situation when your ls binary get corrupted. Is there any alternative of &quot;ls&quot; command. The Answer is &quot;YES&quot; echo does ls echo command is mostly used to display a line of text . echo can"},"aioseo_meta_data":{"post_id":"834","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-06-17 12:56:59","breadcrumb_settings":null,"limit_modified_date":false,"open_ai":null,"ai":null,"created":"2021-12-10 16:16:50","updated":"2026-06-30 23:46:59"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.supportpro.com\/blog\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/\" title=\"Miscellaneous\">Miscellaneous<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tAlternative to \u201cls\u201d command\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.supportpro.com\/blog"},{"label":"Miscellaneous","link":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/"},{"label":"Alternative to &#8220;ls&#8221; command","link":"https:\/\/www.supportpro.com\/blog\/alternative-to-ls-command\/"}],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=834"}],"version-history":[{"count":8,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/834\/revisions"}],"predecessor-version":[{"id":3212,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/834\/revisions\/3212"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}