GoAdmio

list

List the files in a directory (the current one by default) with octal permissions, owner, group, size, and modified time, sorted by name

On this page: Overview · Quick start · Syntax · Arguments · Output · Examples · Troubleshooting · Details · See also


Overview

/go/list shows the files in one directory in a compact table. Unlike a plain ls -l, it shows the permissions as a number (such as 644 or 755), which is the form GoAdmio's fix command and most hosting guides use. It also:

It only reads information. It never changes files.


Quick start

# List the files in the current directory
/go/list

# List the files in a site's web folder
/go/list /home/example.com/www

Syntax

/go/list [path]
Form Behavior
/go/list Lists the files in the current directory.
/go/list <directory> Lists the files directly inside that directory.
/go/list <file> Shows that one file.

Only the first argument is used. Extra arguments are ignored, so a wildcard such as /go/list /path/*.php lists only the first file the shell finds.


Arguments

Position Argument Required Default Notes
1 <path> No The current directory A directory or a file. Relative paths are resolved from where you run the command.

There are no --option value pairs.


Output

The command prints one line per file, with columns aligned and no header row:

644  1  example  example  1.2K  2026-11-18  09:41  index.php
755  1  example  example  35K   2026-11-02  14:05  wp-cron.php
600  1  example  example  3.1K  2026-10-27  21:18  .htaccess
Column Meaning
1 Permissions in octal, such as 644
2 Number of hard links to the file (normally 1)
3 Owner
4 Group
5 Size, in human-readable form (K, M, G; units of 1024)
6 Modified date (YYYY-MM-DD)
7 Modified time (HH:MM)
8 File name
Outcome What you get
Directory has files The table above.
Directory has no regular files Nothing is printed, and the exit status is 0.
Path doesn't exist Mo such file or directory, exit status 1. (The message has a typo in the script; it means "No such file or directory".)

Examples

# What is in the current folder?
/go/list
# Check the permissions of a site's files
/go/list /home/example.com/www
# Look at a single file
/go/list /home/example.com/www/wp-config.php
# Show only the files that aren't 644 (for example, to find odd permissions)
/go/list /home/example.com/www | awk '$1 != 644'

Troubleshooting

Symptom Likely cause Fix
Mo such file or directory The path doesn't exist. Check the spelling. The message itself is misspelled in the script.
Nothing is printed The directory contains only subfolders, or it is empty. Subfolders and symbolic links are not listed. Use ls -la <directory> to see everything.
Lines are missing, split, or show errors for some files The file name contains spaces or special characters, which the command doesn't handle. See Known limitations. Rename the file, or use ls -l.
stat: cannot statx ... or ls: cannot access ... You don't have access to the directory. The file search runs with sudo, but the permission and detail lookups don't. Run the command as root.
Permissions show as 644, but you want rw-r--r-- The command prints octal only. Use ls -l.
Subfolders you expected are missing The command lists regular files only, and isn't recursive. List the subfolder separately, or use find.

Details

How it works

flowchart TD
    A["list [path]"] --> B{"Path given?"}
    B -- "No" --> C["Use current directory"]
    B -- "Yes" --> D{"File or directory exists?"}
    D -- "No" --> E["Print error, exit 1"]
    D -- "Yes" --> F["Use the path"]
    C --> G["Find regular files, one level deep"]
    F --> G
    G --> H{"Any files?"}
    H -- "No" --> I["Print nothing"]
    H -- "Yes" --> J["Read permissions, owner, group, size, time for each file"]
    J --> K["Align columns and sort by name"]
  1. Logs the call to /var/log/go/list.log.
  2. Uses the current directory if no path is given. Otherwise checks that the path is an existing file or directory, and exits with an error if it isn't.
  3. Finds the regular files directly inside the path (one level deep, with sudo). Subfolders and symbolic links are skipped. Hidden files are included.
  4. For each file, reads the octal permissions with stat, and the link count, owner, group, size, and modified time with ls.
  5. Builds one line per file, aligns the columns, and sorts by file name.

What is and isn't shown

Item Shown?
Regular files in the directory Yes
Hidden files (names starting with .) Yes
Subdirectories No
Symbolic links No
Files inside subdirectories No
A header row No
A total count No (the script counts the files but doesn't print the number)

The sort follows the server's language settings, so upper and lower case may be ordered differently from one server to another.

Known limitations


See also

Command Description
fix Reset ownership and permissions for one account or all accounts
scan Scan newly modified PHP files for shells and the root password
findbom Find PHP files that start with a UTF-8 byte order mark (BOM)