13 examples for ls

{{ score }}
  # Lists all of the files in my current directory in ascending order based on last modification time.  
# -l flag displays info like mode, owner, group, etc.
# -t flag sorts by time of last modification
# -r reverses the order of the sort, so that the most recent entry is on bottom rather than top
ls -ltr
        
{{ score }}
  # Displays your current directory how it ought to be shown:
# -A : print all files except ./ and ../
# -l : show detailed file information
# -t : sort by time-last-modified
# -r : reverse the sort, to show most recent on bottom
# -h : show file sizes in humna-readable format
# -G : colorize the output
ls -AltrhG
        
{{ score }}
  # Prints all files, including "hidden" files/directories (ones starting with '.')
ls -a
        
{{ score }}
  # List only directories.
ls -d */
        
{{ score }}
  # Show result in one colomn
ls -1
        
{{ score }}
  # -F append indicator (one of */=>@|) to entries
# -h Human readable file sizes
# -l long list format 
# -A "almost" all - excludes . and ..
ls -FhlA
        
{{ score }}
  # Show the inodes
ls -i
        
{{ score }}
  # find the file you just downloaded
pushd ~/Downloads; ls -toh | head; popd
        
{{ score }}
  # Prints the number of files in the directory (including other directories)
ls -1 | wc -l
        
{{ score }}
  # your_comment_here
#list the contents of a directory
ls .

#list the contents of a directory with attributes
ls -l .

#list the all contents of a directory including hidden files/direcotories
ls -a .

#recursively list the files and directories

ls -R .
        
{{ score }}
  # look up nameservers for DOMAIN
host -t ns DOMAN
        
{{ score }}
  # look up the mailserver for DOMAIN
host -t mx DOMAIN
        
{{ score }}
  # List directories and their files
ls *

# tip a bro some bitcoin 1LL1Q1cSSTDPZxWXp2XcDWfZkHGb7rps6n