Red Hat Linux Ls Command

- Image via CrunchBase
Red Hat Linux – Using the Linux ls Command to List the Contents of A Directory
The Linux ls command is one of the most commonly used commands. It is used to list the contents of a directory and show the files and other directories in a directory.
In the Windows world, a Linux directory is called a Windows folder.
There are lots of options that can be used with the ls command to see different information on the files and directories that are in a directory.
Running the Linux ls Command with Examples of Options
You can run the following Linux ls command examples at the command line prompt to get real, practical commands training experience!
Linux Commands Training Tips: When you run the ls commands below, with the examples of ls command options and parameters, don’t type in the $ (dollar sign) prompt. Just type in the commands shown at the right of the $ sign.
Run the ls command without any options to see the contents of the current directory.
- $ ls
Run the ls command with the -l option for “long” option to see a longer and more detailed listing of the current directory.
- $ ls -l
Now run the command below and add the -a option to show “all” files (which will cause the normally hidden files to appear) in the current directory.
- $ ls -la
The ls command below shows the contents of the root directory. Many of the directory names that appear in the / (root) directory are common to all Linux distros. Notice that a directory named sbin (for superuser binaries) appears.
- $ ls /
Now list the contents of the sbin directory.
- $ ls /sbin
Now get a “long” listing of the sbin directory.
- $ ls -l /sbin
The next ls command shows the contents of sbin sorted by size (due to the upper case S option), with the largest file at the top. You can see the size of items in the fifth column from the left. And you can click on the scroll bar on the right side of the terminal emulation window to scroll up!
- $ ls -lS /sbin
Now see the files in reverse order, due to the -r option.
- $ ls -lSr /sbin
And now add the h option for “human readable” to cause a file with a size of 7,169 to appear as 7k.
- $ ls -lSrh /sbin
The ls command is one of the GNU Linux commands, which are the “core” Linux commands that are common to ALL Linux distributions. Many people start considering on using free linux as option to their operating system. To learn linux red hat commands you can choose fedora to get the enterprise feel on linux.
By learning the GNU Linux commands, you learn how to use ALL Linux versions!
By the way…do you want to learn exactly how to use Linux and run red hat Linux commands for Linux System Administration and get real, practical Linux training experience by running hundreds of examples of Linux commands? Stay tune as I will add more linux commands in this web site.
Priyo Wibowo | IT Consultant
Other related articles:
- Comment on Painless dual-booting with Red Hat Enterprise Linux 5 … – I have tried installing both on my macbook pro (unibody) and my mac pro… still I cant seem to get it work. I cant see the Linux (or the ironic-windows) option with mac’s built-in chooser. I only see “Macintosh HD”… …
- How to change the hostname of a Linux system | MDLog:/sysadmin – How to change the hostname of a Linux system. Normally we will set the hostname of a system during the installation process. Many peoples don’t care about this, and don’t change the hostname even if for example this was set to something …
- red hat 5/centos 5.1 and microsoft virtual server 2005 r2 sp1 – parallels desktop for mac and vmware fusion (mac)/workstation (pc) don’t seem to have issues with the current generation of linux distros. but, microsoft’s virtual pc and virtual server do, unfortunately. and, since most of my work is …
- Comment on 250+ Computer eBooks Download Links by Feeling Tired … – Wow. Great collection, thanks for the info.
- Red Hat Magazine | Professional audio with Fedora Core 6 – This is the first in a series of articles that aim to provide some guidance on how to get started making use of the professional audio tools and capabilities of a Fedora Core system. This article covers playing notes using the JACK …
- Red Hat Magazine | Solutions from the road: Red Hat Enterprise … – One of the many uses of having a Red Hat Consultant on site is to provide “best practices” in regard to using or deploying Red Hat Linux or any of Red Hat’s applications. These best practices come from the way a product was written as …
- Red Hat Magazine | Book review: Live Linux CDs: Building … – Normally, a computer has an operating system installed on the hard drive. When the computer powers up, the hard drive reads the operating system, loads it into memory, and the system is ready to go. With a live CD, the operating system …
- patent infringement lawsuit filed against red hat & novell – earlier this month, ballmer reiterated his stance on patents and linux: microsoft chief executive steve ballmer has warned users of red hat linux that they will have to pay microsoft for its intellectual property. …
- Google Talk on Linux – Google Talk works fine with a Jabber compatible IM client such as GAIM but out of curiousity I tried to install the Windows client so I could use the voice function. Alas, my version of Wine isn’t up to the task. No matter what path I enter in the second dialog the INSTALL button is always greyed out! Others have had more luck installing, but the application doesn’t run yet.
- Found in a Red Hat kernel spec file – Journalist, # # The changelog below is a list of modifications that have been made # to the kernel at one time. By no means does this text reflect any # official position of Red Hat, Inc. nor does any text reflect what # is in the actual current kernel, due to the fact that we actually log # tests and one-off builds as well.
- tecosystems » Red Hat v Ubuntu: The Mobily Editorial – As for the first South African in space, Mark’s comments were almost to the letter what I expected to hear. Like MySQL’s Marten Mickos, Shuttleworth can play the role of diplomat when it suits him and in this case it’s the right move. Embracing Mobily’s comments would be premature at this point, because candidly Ubuntu is not (yet) in a position to overtly challenge the enterprise strength of Red Hat, hence the Kung Fu style humility.
- Google.Aprendiendo un poco más. « Diario de un aprendiz. – O también: site: edu, que devuelve solo resultados de webs en el dominio .edu. § Link: devuelve una lista de páginas que apuntan a una URL concreta. No hace falta teclear http://. Por ejemplo: link:www. uniovi.es. Esta búsqueda devolverá un listado de …. [if !supportLists]–> – Intitle:”Test Page for the SSL/TLS-aware Apache installation” “Hey, it worked!” – Intitle:”Test Page for the Apache Web Server on Red Hat Linux” …
- Navigating the Security Practice Landscape – The course itself uses Red Hat Linux 9. There are discussions and a lab. The 10 Principles [Rogers 04] covered in the class are. Survivability is an enterprise-wide concern. Everything is data. Not all data is of equal value to an …
This entry was posted on Monday, November 30th, 2009 at 5:58 pm and is filed under Red Hat Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

April 15th, 2010 at 3:40 am
Paket C setara SMA » Blog Archive » Red Hat Linux Ls Command says:[...] More here: Red Hat Linux Ls Command [...]
June 3rd, 2010 at 4:08 pm
mari kita dukung orang indonesia yang ngeblog, karena ngeblog terbukti dapat meningkatkan pendapatan masyarakat indonesia
June 18th, 2010 at 7:47 pm
Nice intriguing article. It provides informative insights to the blog readers like me.
August 4th, 2010 at 5:13 am
The Zune concentrates on being a Portable Media Player. Not a web browser. Not a game machine. Maybe in the future it’ll do even better in those areas, but for now it’s a fantastic way to organize and listen to your music and videos, and is without peer in that regard. The iPod’s strengths are its web browsing and apps. If those sound more compelling, perhaps it is your best choice.
August 15th, 2010 at 11:44 am
anyway ,nice comment ,and i love your blog ,i will back again ,i promise – -:<A href=":ffxivgil
August 17th, 2010 at 2:46 am
Nice services offered by you. I hope you will extend your services better than this and run with success. Thanks for posting