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
| Flag | Meaning |
|---|---|
-1, --oneline | display one entry per line |
-G, --grid | display entries as a grid (default) |
-l, --long | display extended details and attributes |
-R, --recurse | recurse into directories |
-T, --tree | recurse into directories as a tree |
-x, --across | fill the grid across, rather than downwards |
-F, --classify | display a type indicator (/, *, @, |, =) next to file names |
--color=WHEN | when to colour output: always, auto (default), never |
--color-scale | highlight levels of file sizes distinctly |
--icons | display icons next to file names |
--no-icons | don't display icons (overrides --icons) |
--absolute | display each file's absolute path instead of its name |
--no-quotes | don't quote file names that contain spaces |
-w, --width=COLS | set the terminal width, overriding COLUMNS/auto-detection |
--stdin | also 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
| Flag | Meaning |
|---|---|
-a, --all | show hidden and 'dot' files (pass twice to also show . and ..) |
-A, --almost-all | show hidden and 'dot' files, but never add . or .. |
-d, --list-dirs | list directories like regular files, don't descend |
-L, --level=DEPTH | limit the depth of recursion |
-r, --reverse | reverse the sort order |
-s, --sort=FIELD | which field to sort by — see View Modes & Sorting |
--group-directories-first | list directories before other files |
--group-directories-last | list directories after other files |
-D, --only-dirs | list only directories |
-f, --only-files | list only regular files |
--no-symlinks | hide symbolic links entirely |
--show-symlinks | show symlinks even under --only-dirs/--only-files |
--git-ignore | ignore files mentioned in .gitignore |
-I, --ignore-glob=GLOBS | glob patterns (pipe-separated) to ignore |
Long view options
These only take effect alongside -l/--long.
| Flag | Meaning |
|---|---|
-b, --binary | list sizes with binary (1024-based) prefixes |
-B, --bytes | list sizes in plain bytes |
-g, --group | list each file's group |
--smart-group | blank the group value when it matches the owner's name |
-h, --header | add a header row |
-H, --links | list each file's hard link count |
-i, --inode | list each file's inode number |
-m, --modified | use the modified timestamp |
-M, --mounts | list each directory's mount-point device (Linux only) |
-S, --blocks | list each file's number of filesystem blocks |
-t, --time=FIELD | which timestamp to use: modified, changed, accessed, created |
-u, --accessed | use the accessed timestamp |
-U, --created | use the created timestamp |
-X, --dereference | show a symlink's target's size, permissions, and other metadata instead of its own |
--total-size | show a directory's total recursive size instead of - |
-Z, --context | list each file's SELinux security context (Linux only) |
-@, --extended | list each file's extended attributes |
--changed | use the changed timestamp |
--git | list each file's Git status |
--git-repos | list each directory's Git repo status (-/|/+) |
--git-repos-no-status | like --git-repos, but never runs git status (faster, repo-or-not only) |
--no-git | suppress all Git columns, overriding --git/--git-repos/--git-repos-no-status |
--time-style=STYLE | how to format timestamps: default, iso, long-iso, full-iso, relative |
--no-permissions | suppress the permissions column |
--octal-permissions | list permissions in octal |
--no-filesize | suppress the file size column |
--no-user | suppress the user column |
--no-time | suppress the time column |
-n, --numeric | list user/group as numeric IDs |
Other
| Flag | Meaning |
|---|---|
-v, --version | show version information and exit |
-?, --help | show the full help text and exit |
Examples
Detailed table, newest files first, with a header row:
lsgo -lh --sort=newestA tree, three levels deep, skipping anything Git already ignores:
lsgo -T -L3 --git-ignoreGrid view with icons and Git status baked into a long table:
lsgo -l --git --iconsOne entry per line, hidden files included, directories grouped first:
lsgo -1a --group-directories-firstLong view with each directory's total recursive size and relative timestamps:
lsgo -l --total-size --time-style=relativeLong view of every subdirectory's Git repo status, without running git status on each one:
lsgo -l --git-repos-no-statusPipe a list of files into lsgo for a detailed view:
find . -name '*.go' | lsgo --stdin -l