Skip to content

Usage & Flags

lsgo [options] [files...]

With no arguments, lsgo lists the current directory as a grid. Pass one or more paths to list specific files or directories instead.

This page is a reference for every flag. lsgo --help always reflects the exact wording shipped in your build, so treat that as the final word if anything here ever drifts.

Display options

FlagMeaning
-1, --onelinedisplay one entry per line
-G, --griddisplay entries as a grid (default)
-l, --longdisplay extended details and attributes
-R, --recurserecurse into directories
-T, --treerecurse into directories as a tree
-x, --acrossfill the grid across, rather than downwards
-F, --classifydisplay a type indicator (/, *, @, |, =) next to file names
--color=WHENwhen to colour output: always, auto (default), never
--color-scalehighlight levels of file sizes distinctly
--iconsdisplay icons next to file names
--no-iconsdon't display icons (overrides --icons)
--absolutedisplay each file's absolute path instead of its name
--no-quotesdon't quote file names that contain spaces
-w, --width=COLSset the terminal width, overriding COLUMNS/auto-detection
--stdinalso read newline-separated paths from stdin

-1, -G, -l, and -T are all "view mode" flags — see View Modes & Sorting for exactly how they interact when more than one is given on the same command line.

Filtering options

FlagMeaning
-a, --allshow hidden and 'dot' files (pass twice to also show . and ..)
-A, --almost-allshow hidden and 'dot' files, but never add . or ..
-d, --list-dirslist directories like regular files, don't descend
-L, --level=DEPTHlimit the depth of recursion
-r, --reversereverse the sort order
-s, --sort=FIELDwhich field to sort by — see View Modes & Sorting
--group-directories-firstlist directories before other files
--group-directories-lastlist directories after other files
-D, --only-dirslist only directories
-f, --only-fileslist only regular files
--no-symlinkshide symbolic links entirely
--show-symlinksshow symlinks even under --only-dirs/--only-files
--git-ignoreignore files mentioned in .gitignore
-I, --ignore-glob=GLOBSglob patterns (pipe-separated) to ignore

Long view options

These only take effect alongside -l/--long.

FlagMeaning
-b, --binarylist sizes with binary (1024-based) prefixes
-B, --byteslist sizes in plain bytes
-g, --grouplist each file's group
--smart-groupblank the group value when it matches the owner's name
-h, --headeradd a header row
-H, --linkslist each file's hard link count
-i, --inodelist each file's inode number
-m, --modifieduse the modified timestamp
-M, --mountslist each directory's mount-point device (Linux only)
-S, --blockslist each file's number of filesystem blocks
-t, --time=FIELDwhich timestamp to use: modified, changed, accessed, created
-u, --accesseduse the accessed timestamp
-U, --createduse the created timestamp
-X, --dereferenceshow a symlink's target's size, permissions, and other metadata instead of its own
--total-sizeshow a directory's total recursive size instead of -
-Z, --contextlist each file's SELinux security context (Linux only)
-@, --extendedlist each file's extended attributes
--changeduse the changed timestamp
--gitlist each file's Git status
--git-reposlist each directory's Git repo status (-/|/+)
--git-repos-no-statuslike --git-repos, but never runs git status (faster, repo-or-not only)
--no-gitsuppress all Git columns, overriding --git/--git-repos/--git-repos-no-status
--time-style=STYLEhow to format timestamps: default, iso, long-iso, full-iso, relative
--no-permissionssuppress the permissions column
--octal-permissionslist permissions in octal
--no-filesizesuppress the file size column
--no-usersuppress the user column
--no-timesuppress the time column
-n, --numericlist user/group as numeric IDs

Other

FlagMeaning
-v, --versionshow version information and exit
-?, --helpshow the full help text and exit

Examples

Detailed table, newest files first, with a header row:

sh
lsgo -lh --sort=newest

A tree, three levels deep, skipping anything Git already ignores:

sh
lsgo -T -L3 --git-ignore

Grid view with icons and Git status baked into a long table:

sh
lsgo -l --git --icons

One entry per line, hidden files included, directories grouped first:

sh
lsgo -1a --group-directories-first

Long view with each directory's total recursive size and relative timestamps:

sh
lsgo -l --total-size --time-style=relative

Long view of every subdirectory's Git repo status, without running git status on each one:

sh
lsgo -l --git-repos-no-status

Pipe a list of files into lsgo for a detailed view:

sh
find . -name '*.go' | lsgo --stdin -l