LinuxCommandLibrary

standard

Standard is not a standard Linux command

TLDR

Lint all JavaScript source files in the current directory

$ standard
copy

Lint specific JavaScript file(s)
$ standard [path/to/file1 path/to/file2 ...]
copy

Apply automatic fixes during linting
$ standard --fix
copy

Declare any available global variables
$ standard --global [variable]
copy

Use a custom ESLint plugin when linting
$ standard --plugin [plugin]
copy

Use a custom JS parser when linting
$ standard --parser [parser]
copy

Use a custom ESLint environment when linting
$ standard --env [environment]
copy

SYNOPSIS

ls [OPTION]... [FILE]...

PARAMETERS

-a or --all
    Do not ignore entries starting with '.' (hidden files).

-l
    Use a long listing format, showing permissions, owner, group, size, and modification time.

-h or --human-readable
    With -l, print sizes in human readable format (e.g., 1K, 234M, 2G).

-R or --recursive
    List subdirectories recursively.

-t
    Sort by modification time, newest first.

-S
    Sort by file size, largest first.

-d or --directory
    List directories themselves, not their contents. Useful with -l.

-F or --classify
    Append indicator (one of */=>@|) to entries.

DESCRIPTION

The ls command is one of the most fundamental and frequently used commands in Unix-like operating systems. It is used to list the contents of directories. By default, when executed without any arguments, ls lists the files and subdirectories in the current working directory, excluding hidden files (those starting with a dot '.').

When given one or more file or directory names as arguments, ls will list information about those specific files or the contents of those directories. The command provides various options to control the format and content of the output, allowing users to view detailed information such as file permissions, ownership, size, last modification time, and more. It is an essential tool for navigating and understanding the file system hierarchy.

CAVEATS

The exact output formatting (especially colors) can vary significantly based on system configuration, environment variables (like LS_COLORS), and the shell being used.

When listing files in directories where you do not have read permissions, ls will typically report "Permission denied" errors for those directories, even if you can see their names.

COLORIZED OUTPUT

Many modern Linux distributions configure ls to output colors by default. This is usually managed through an alias (e.g., alias ls='ls --color=auto') and the LS_COLORS environment variable, which defines the colors for different file types (directories, executables, symbolic links, etc.). This greatly enhances readability.

WILDCARD USAGE

ls can be effectively used with shell wildcards (globbing) like * (matches any sequence of characters), ? (matches any single character), and [] (matches any character within the brackets). For example, ls *.txt lists all files ending with .txt in the current directory.

HISTORY

The ls command is one of the oldest and most fundamental utilities in the Unix operating system, originating from the earliest versions of Unix developed at Bell Labs in the early 1970s. Its design was influenced by the DIR command found in Multics. Over the decades, it has been reimplemented numerous times (e.g., GNU Coreutils ls for Linux) but has largely retained its core functionality and interface, becoming a ubiquitous tool across all Unix-like systems. Its evolution has focused on adding more options for detailed output and better integration with modern file systems.

SEE ALSO

dir(1), vdir(1), find(1), tree(1), stat(1), chmod(1)

Copied to clipboard