• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

dir Command Examples in Linux

by Deepika

dir command in Linux lists the directory contents using one line per file. The special characters are represented by backslash escape sequences. This works similar to the command:

# ls -C --escape

dir Command Examples

1. List all files, including hidden files:

# dir -all

2. List files including their author (`-l` is required):

# dir -l --author

3. List files excluding those that match a specified blob pattern:

# dir --hide=pattern

4. List subdirectories recursively:

# dir --recursive

5. Display help:

# dir --help

Filed Under: Linux

Some more articles you might also be interested in …

  1. System Log File /var/log/messages Is Getting Deleted or Trimmed Automatically (CentOS/RHEL)
  2. avo: The official command-line interface for Avo (Command Examples)
  3. How to Disable rpc.quotad Service in CentOS/RHEL 6 and 7
  4. Server Application Getting “connection refused” From Remote Servers [due to firewalld or iptables] – CentOS/RHEL 7
  5. “az account” Command Examples
  6. How to persistently set nr_requests using UDEV rules
  7. aurman Command Examples
  8. alias: command not found
  9. CentOS / RHEL 7 : Understanding Kexec and Kdump
  10. CentOS / RHEL 7 : unable to start vsftpd service

You May Also Like

Primary Sidebar

Recent Posts

  • csslint: A linter for CSS code
  • csh: The shell (command interpreter) with C-like syntax (Command Examples)
  • csc: The Microsoft C# Compiler (Command Examples)
  • crystal: Tool for managing Crystal source code

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright