lt
List files with long format
TLDR
Start tunnel from a specific port
Specify the upstream server doing the forwarding
Request a specific subdomain
Print basic request info
Open the tunnel URL in the default web browser
SYNOPSIS
ls [OPTION]... [FILE]...
Note: lt is typically an alias for ls -lt.
PARAMETERS
-l
Use a long listing format, showing detailed information (permissions, owner, size, time, etc.).
-t
Sort the output by modification time, with the newest entries listed first.
-a
Do not ignore entries starting with '.' (hidden files and directories).
-h
When used with -l, print human readable sizes (e.g., 1K, 234M, 2G).
-r
Reverse the order of sorting.
-d
List directories themselves, rather than their contents.
--time-style=FORMAT
Show times in the specified format (e.g., 'full-iso' for YYYY-MM-DD HH:MM:SS.NNNNNNNNN +ZZZZ).
DESCRIPTION
The command lt is not a standard standalone Linux command. Instead, it is most frequently encountered as a user-defined alias for the
ls -lt command. The ls utility is one of the most fundamental commands in Linux, used to list the contents of directories. When combined with the -l and -t options, its behavior is specifically modified:
-l (long format): Displays detailed information about each file or directory, including permissions, number of hard links, owner, group, size, and last modification time.
-t (sort by time): Sorts the output by modification time, with the newest files or directories appearing first.
Therefore, when you execute lt, you are typically invoking ls -lt, which provides a detailed, time-sorted list of files and directories in the current working directory, or a specified path. This alias is popular among users who frequently need to see recently modified files quickly. It's a convenience shortcut rather than a distinct command.
CAVEATS
The primary caveat for lt is that it is not a standard Linux command. Its functionality relies entirely on a user-defined alias, typically set in shell configuration files like .bashrc or .zshrc. Therefore, lt may not be available on all systems, or it might perform a different action if a user has defined it differently. Always confirm its definition with alias lt or type lt if its behavior is unexpected. Relying on ls -lt directly ensures portability across different environments.
DEFINING THE ALIAS
To create the lt alias yourself, you can add the following line to your shell's configuration file (e.g., ~/.bashrc for Bash, ~/.zshrc for Zsh):
alias lt='ls -lt'
After adding the line, you need to either open a new terminal session or source the configuration file (e.g., source ~/.bashrc) for the alias to take effect.
HISTORY
The history of the ls command dates back to the early days of Unix. It was one of the first commands developed for the AT&T Unix operating system. The -l (long format) and -t (sort by time) options have been integral parts of ls for a very long time, providing essential ways to view file system contents. The concept of creating shell aliases like lt for frequently used command combinations (like ls -lt) emerged with the development of more advanced shells such as csh, ksh, bash, and zsh, allowing users to customize their command-line environment for efficiency and personal preference.