Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstalliTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
ls lists information about files and directories. With no operand it examines the current directory; with a directory operand it shows that directory’s contents, non-recursively by default. Names beginning with a period are hidden unless you request them.
This guide covers the portable POSIX behavior, GNU/Linux extensions, metadata, recursion, sorting, symlinks, locale effects, scripting concerns, and practical commands you can use safely on Linux and Unix systems.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →What ls does
The command’s basic form is:
ls [OPTION]... [FILE]...
GNU ls lists information about files of any type, including directories. If you provide no non-option argument, it acts as though you specified ., the current directory. If you provide a directory such as /var/log, it lists that directory’s entries rather than displaying the directory entry itself.
For example:
ls
ls /var/log
ls report.txt
The first command lists the current working directory, the second lists the contents of /var/log, and the third reports information about one named file. A directory is not traversed recursively unless you request recursion.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.
GNU permits options and file operands to be intermixed, but scripts should put options first and use an uncomplicated, documented command line. Option parsing details can differ between implementations.
Show hidden files and control which names are included
Entries whose names begin with . are omitted from an ordinary listing. This includes ordinary hidden files and the special directory entries . and ...
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesInclude every entry with -a
ls -a
-a means “all”: it includes names beginning with a period, including the implied current- and parent-directory entries. The option is defined by both GNU and POSIX ls.
Include hidden names but omit . and .. with -A
ls -A
-A (“almost all”) shows hidden names while suppressing the two implied entries. This is usually the clearest choice when you want to inspect configuration files without the visual noise of . and ...
Hide selected names in GNU ls
GNU implementations provide pattern-based controls such as --hide=PATTERN. They are useful when a directory contains generated files you do not want in a particular view. These long options are GNU extensions, not a portable Unix baseline, so check the target system before using them in scripts.
Read the long format with -l
ls -l
The long format displays extended metadata instead of only names. Typical implementations show a file-type and permission field, link count, owner, group, size, a modification timestamp, and the name. The exact columns, timestamp presentation, and available identity fields are implementation-dependent; do not assume that every Unix variant prints precisely the GNU layout.
Combining -l with -a is the common way to inspect all entries and their metadata:
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
ls -la
The difference between ls -l and ls -la is therefore the inclusion of dot files, not a different metadata format. -l alone still omits names beginning with a period.
Inspect a directory entry instead of its contents
ls -ld /var/log
-d tells ls not to descend into a directory operand. Without it, ls -l /var/log displays the entries inside /var/log; with it, the command displays the metadata for the /var/log directory itself. POSIX includes -d.
Other metadata controls
-irequests inode numbers where supported by the implementation.-srequests allocated-block information; block accounting depends on the filesystem and implementation.-nuses numeric user and group IDs instead of resolving names on implementations that provide it.-gand-oadjust owner/group columns on systems that support the traditional Unix meanings.- GNU
--authoradds an author column when that metadata is available. - GNU
--block-size=SIZEselects the unit used for displayed block counts or sizes. It is an extension and should be labeled as such in portable documentation.
For readable approximate units on GNU/Linux, use:
ls -lh
The -h presentation is a GNU/common extension rather than a guarantee of every Unix ls.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →List subdirectories recursively
ls -R project
-R recursively lists the contents of project and each directory below it. Output is grouped by directory, with a directory heading followed by its entries.
Recursion can become very large on source trees, home directories, mounted filesystems, or directories containing dependency caches. It also encounters permission errors and can take considerably longer than a single-directory listing. Use a specific starting path, and consider a focused command such as ls -R project/src rather than beginning at a broad location such as /.
Recursion and the handling of symlinked directories can vary with implementation and options. If you need an exact traversal policy, verify the behavior of the ls supplied by that Unix system.
Sort by name, time, or size
Name order is the normal default. Sorting is affected by the current locale, so the same set of names can appear in a different order on systems using different locale settings.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Modification time
ls -lt
ls -ltr
-t sorts by modification time, newest first. Adding -r reverses the resulting order, so ls -ltr shows the oldest entries first. Date precision and tie-breaking details are implementation-dependent.
File size
ls -lS
ls -lSr
-S sorts by size, largest first; -r reverses it. GNU and many Unix implementations provide this option, but verify it when targeting a narrowly defined POSIX environment. Pairing it with -h affects display units, not the underlying numeric comparison:
ls -lhS
Other time fields
Unix implementations commonly provide switches that select access time or status-change time, traditionally -u and -c, often combined with -t. Their exact interaction and timestamp semantics should be checked against the local manual page, especially on non-GNU systems.
Make a predictable sort for scripts
LC_ALL=C ls -1
GNU documentation recommends LC_ALL=C when a stable, locale-independent ordering is required. -1 requests one entry per line where supported. This makes output easier to inspect or pass through simple tools, but it does not make arbitrary filenames safe to parse; unusual characters can still require quoting or escaping.
Control output layout, quoting, and colors
On an interactive terminal, GNU ls normally arranges names in columns. When standard output is redirected, GNU ls normally emits one name per line. Terminal width, locale, quoting settings, and implementation all influence the final appearance.
Force one entry per line
ls -1
Use -1 when a one-per-line view is easier to read or when you want to avoid terminal column wrapping. It is included in the POSIX option set.
Choose other layouts
POSIX systems may support column, comma-separated, or across-the-page layouts through options such as -C, -m, and -x. These are presentation choices, not changes to which files are selected.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Classify entries and use color
-F appends indicators such as a slash for directories on implementations that support it. GNU --color enables colorized output according to terminal and environment settings. Both classification details and color defaults vary, so do not treat visual markers as machine-readable data.
Unusual characters in names
Filenames can contain spaces, tabs, newlines, and other characters. Implementations may quote, escape, or replace non-printing characters; POSIX includes -q for displaying non-printing characters as question marks. When preserving exact filenames matters, use a file-oriented interface designed for machine processing rather than parsing a human-formatted ls screen.
Understand symlinks and directory operands
Default symlink behavior
In a long listing, a symbolic link is normally shown as a link, often with its target displayed after an arrow. Metadata describes the link itself rather than the target unless you request dereferencing.
Follow links with GNU -L
ls -lL linkname
GNU -L dereferences symbolic links when obtaining file information, so the reported mode, owner, size, and timestamps come from the target where it can be reached. This is a GNU/common behavior; check the target implementation when portability matters.
Combine -L and -d deliberately
These options answer different questions: -d controls whether a directory operand is descended into, while -L controls whether symbolic links are followed for metadata. Combining them can be useful when auditing a link or mount point, but test the exact result on the Unix variant you administer.
Recommended Free Tools
GNU/Linux versus portable POSIX ls
POSIX defines a useful baseline synopsis:
ls [-ikqrs] [-glno] [-A|-a] [-C|-m|-x|-1] [-F|-p] [-H|-L] [-R|-d] [-S|-f|-t] [-c|-u] [file...]
That baseline covers selection, metadata, layout, recursion, link handling, and common sort controls. Real systems can still differ in defaults, column headings, timestamp formatting, and extensions.
| Capability | Portable baseline | GNU or implementation-specific examples |
|---|---|---|
| Hidden names | -a, -A |
--almost-all is GNU long-option spelling for almost all |
| Metadata | -l, -i, -s, traditional owner/group switches |
--author, --block-size=SIZE |
| Traversal | -R, -d |
Detailed symlink and recursion behavior can vary by implementation |
| Sorting | Name order plus common time/size controls in the POSIX synopsis | GNU offers additional time and formatting controls such as --time-style |
| Display | -1, -C, -m, -x, -F, -p |
--color, --hide=PATTERN, richer quoting controls |
If a command must run on several Unix families, stay within the POSIX set, avoid GNU long options, and test the exact target shells and utilities. If you specifically administer GNU/Linux, GNU extensions can improve readability and filtering but should be labeled in documentation and scripts.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
The GNU Project’s current documentation identifies GNU Coreutils 9.11 (2026 documentation) as the relevant version line. Other systems may ship a different release or a non-GNU implementation.
Practical command recipes
See everything, including hidden files, with readable metadata
ls -lah
This combines all-name selection, long metadata, and human-readable sizes on GNU/Linux.
Find the largest entries in the current directory
ls -lhS
The largest entries appear first. Add -a if hidden files must be included.
See the newest files first
ls -lt
Add -r for oldest first.
Inspect a directory itself
ls -ld /etc
ls -ld /path/to/link
Use this when you need permissions and ownership on the directory or link object, not a listing of its contents.
Inventory a tree
ls -lR project
Use a narrowly scoped path and expect separate headings for each subdirectory.
Stabilize locale and line layout
LC_ALL=C ls -1 /var/log
This requests a consistent C-locale ordering and one entry per line on implementations that support -1.
Free tools Windows power users keep installed
One-click scans. No signup required.
Exit statuses, errors, and troubleshooting
GNU ls returns status 0 when all requested work succeeds, 1 for minor problems, and 2 for serious trouble such as an invalid option or failure to access a specified operand. Check the status in a shell with echo $? immediately after the command.
- “invalid option”: The switch may be GNU-only, misspelled, or unsupported by the installed Unix implementation. Consult that system’s
lsmanual and replace it with a POSIX option where possible. - A directory appears empty: Ordinary
lshides dot files. Tryls -Aorls -a. - You expected directory metadata but saw contents: Add
-dto inspect the directory operand itself. - Order differs between machines: Locale affects name sorting. Use
LC_ALL=Cwhen a stable byte-oriented order is appropriate. - Names or columns look strange: Terminal width, quoting rules, non-printing characters, and color settings affect presentation. Use
-1for a simpler view and avoid parsing decorative output. - Recursion is slow or incomplete: Narrow the starting path, check permissions, and remember that
-Rwalks every reachable subdirectory rather than just the first level. - Link metadata seems unexpected: Decide whether you need the link object or its target, then use the default behavior or GNU
-Laccordingly.
Using ls safely in scripts
ls is primarily a human inspection tool. Its columns, quoting, color, locale sorting, and treatment of unusual filenames are designed for display, not a stable data interchange format. Redirecting output and adding -1 can make a simple diagnostic easier to read, but it does not eliminate ambiguities caused by newlines, tabs, or escape characters in filenames.
For automation, prefer interfaces that expose filenames as records with explicit delimiters and metadata fields. If you nevertheless call ls from a script, set the locale deliberately, place options consistently, disable visual decorations, check the exit status, and document whether the script requires GNU ls or only POSIX behavior.
Quick decision guide
- Just see the current directory:
ls. - Include hidden names without
.and..:ls -A. - Include every name:
ls -a. - Show permissions and ownership:
ls -l. - Inspect a directory itself:
ls -ld DIRECTORY. - Walk a tree:
ls -R DIRECTORY. - Sort newest first:
ls -lt. - Sort largest first:
ls -lS. - Make one-per-line, locale-stable output:
LC_ALL=C ls -1. - Follow a symbolic link for metadata on GNU/Linux:
ls -lL LINK.
The right command depends on whether you are selecting names, exposing metadata, changing traversal, sorting entries, or controlling presentation. Treat GNU enhancements as conveniences with a portability cost, and keep POSIX options for commands that must cross Unix implementations.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

