ll Command in Linux

Learn via video courses
Topics Covered

Transform Your Career

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program

Overview

In the world of Linux, the 'll' command is a robust utility that displays detailed directory listings. An alias for 'ls -l', the ll command in Linux is a handy tool that outputs file and directory details like permissions, number of links, owner, group, size, and time of last modification.

Syntax of ll Command in Linux

The basic syntax of the ll command in Linux is as follows:

Where:

  • [OPTION]: This represents optional flags or switches that modify the behavior of the 'll' command. Some commonly used options include '-a', '-h', and '-R'.
  • [FILE]: This refers to the specific file or directory that you wish to display details for. If no file or directory is specified, 'll' will list the contents of the current directory.
Free Courses by top Scaler instructors
Python Course for Beginners With Certification: Mastering the Essentials
Java Course - Mastering the Fundamentals
DBMS Course - Master the Fundamentals and Advanced Concepts
JavaScript Course With Certification: Unlocking the Power of JavaScript
C++ Course: Learn the Essentials
Python and SQL for Data Science Course
Python Course for Beginners With Certification: Mastering the Essentials
Java Course - Mastering the Fundamentals
DBMS Course - Master the Fundamentals and Advanced Concepts
JavaScript Course With Certification: Unlocking the Power of JavaScript
C++ Course: Learn the Essentials
Python and SQL for Data Science Course

Options in ll Command in Linux

  1. -a: This option makes 'll' display all files, including hidden ones (those whose names start with a dot).

    For example -

    Output:

    This output includes the details of all files, including the hidden '.hiddenfile'.

  2. -h: This option makes 'll' display file size in human-readable format (K for kilobytes, M for megabytes, etc.).

    For example -

    Output:

    The size of 'bigfile' is shown in kilobytes (15K) rather than in bytes.

  3. -R: This option makes 'll' list directories recursively, showing their content and the content of their subdirectories.

    For example -

    Output:

    This output includes the details of 'subdir', as well as the details of the file within 'subdir'.

Scaler Placement Report and Statistics

₹23L
AVG CTC
SCALER PLACEMENT PROOF

Scaler learners achieved 2.5x salary growth with average post-Scaler CTC reaching ₹23L.

11,000+placements
650+companies
Verified data
Hiring Partners:
GoogleGoogleAmazonAmazonMicrosoftMicrosoftFlipkartFlipkartAdobeAdobe1200+ more

Example Usages

  • Using 'll' to list the contents of the current directory.:

    Output:

    Explanation: This output includes the details of all files and directories in the current directory.

  • Using 'll' to list the contents of a specific directory.:

    Output:

    Explanation: This output includes the details of all files and directories in '/path/to/directory'.

Tips

  • Even though 'll' is commonly available, it's not a standard Linux command. It may not be present in some systems. In such cases, you can use 'ls -l' instead.

  • Remember that 'll' is case-sensitive, like all Linux commands. 'LL' is not equivalent to 'll'.

Turn Learning into Career Growth

1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary
1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary

Advanced Use Cases of ll Command in Linux

  • Using 'll' with the '-t' option to sort files by modification time, and the '-r' option to reverse the order.:

    Output:

    Explanation: The 'newerfile', modified most recently, appears last in the output.

  • Using 'll' with the '--author' option to display the author of the files.:

    Output:

    Explanation: The 'user' after the filename is the author of the file.

  • Using 'll' with the '--time=access' and '--time-style=long-iso' options to display the last access time of files in ISO format.:

    Output:

    Explanation: The date before the filename is the last access time of the file in ISO format.

Conclusion

  • The 'll' command in Linux is a powerful tool for displaying detailed directory listings.

  • Although 'll' is an alias for 'ls -l', it's widely used due to its convenience.

  • The 'll' command can be used with various options to customize its output, including displaying all files, showing file size in human-readable format, and listing directories recursively.

  • Advanced usage of 'll' allows for sorting files by modification time, displaying the author of the files, and showing the last access time in a specific format.

  • Remember, 'll' might not be present in some systems, in such cases, 'ls -l' can be used instead.