Shared server guidance · Question & answer

How do I list hidden files, permissions and file sizes on a server?

Use ls with long-format and human-readable options to inspect directory entries. Hidden names begin with a dot; their visibility has no relationship to whether a file is secure. A directory listing shows metadata, not the contents or a complete access-control assessment.

BeginnerLinux VPS and dedicated servers with GNU utilities
Go to the answer

Before you start

  • An authorised SSH session on the Linux server.

Instructions

1. List one directory

Choose the directory you intend to inspect. The example stays inside your home directory and does not recursively traverse the server.

Remote Linux shell
ls -lah -- "$HOME"

-l shows ownership and mode, -a includes dot entries, and -h formats sizes for reading. -- ends command options.

2. Inspect the directory itself

A directory’s own permissions govern access differently from its files. Use -d to show the directory entry rather than listing its children.

Remote Linux shell
ls -ld -- "$HOME"
ls -lt -- "$HOME"

The first command shows the home directory mode; the second orders visible entries by modification time. The listing is a snapshot, not a history.

Check the result

  • Identify the owner, group and mode before requesting any permission change. Treat file names and paths as potentially private when sharing output.

Troubleshooting

ls reports Permission denied
The account may lack directory traversal or listing rights. Ask the owner for the necessary scope instead of changing broad permissions.
The size of a directory looks very small
The listing describes the directory entry. Use du for the space consumed by its contents.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.