pols files
List directories, watch files and track changes in a sandbox
List a directory, watch the files under a path as they change, or track what
changed under a directory since a point in time. They act with root’s rights,
or as a sandbox user with --user (only what it may read). Copy files with
pols cp.
Usage
pols files [flags]
pols files [command]
Subcommands
| Command | Description |
|---|---|
pols files changes |
List what changed under a tracked directory |
pols files ls |
List a directory |
pols files track |
Start tracking the changes under a directory |
pols files untrack |
Stop tracking the changes under a directory |
pols files watch |
Print the changes to files under a path as they happen |
Flags
-h, --help help for files
-u, --user pols users act as this sandbox user (see pols users; default: root)
pols files changes
List the files and directories under DIR created, modified or deleted since
pols files track (at most 10,000).
Usage
pols files changes SANDBOX DIR [flags]
Flags
-h, --help help for changes
pols files ls
List a directory’s entries (at most 10,000), without following symbolic links.
Usage
pols files ls SANDBOX PATH [flags]
Examples
pols files ls web /home/user
Flags
-h, --help help for ls
pols files track
Remember what is under DIR now, so that pols files changes lists what was
created, modified or deleted since. Tracking again starts over. Tracking is
per user and stays across stop, resume and standby. At most 100,000 files.
Usage
pols files track SANDBOX DIR [flags]
Examples
pols files track web /home/user/app
pols exec web -- bash -lc 'cd app && npm run codegen'
pols files changes web /home/user/app
Flags
-h, --help help for track
pols files untrack
Stop tracking the changes under a directory
Usage
pols files untrack SANDBOX DIR [flags]
Flags
-h, --help help for untrack
pols files watch
Watch a directory (and the directories below it, unless --no-recursive) or a
file, and print each file created, modified or deleted, until interrupted.
With --json, print the API’s events, one JSON object per line. Changes the
watch cannot keep up with are reported as an overflow, not dropped silently.
Usage
pols files watch SANDBOX PATH [flags]
Examples
pols files watch web /home/user/app
pols files watch web /home/user/app --json | jq -r .path
Flags
-h, --help help for watch
--no-recursive watch only PATH itself, not the directories below it
The global flags work with this command too.