From aeda49a7d271c2196fcba0d3b2b15d31ad0b33b5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 5 Nov 2016 20:48:46 +0100 Subject: Add CLI for user information + Fix last user activity https://github.com/FreshRSS/FreshRSS/issues/1345 --- cli/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cli/README.md') diff --git a/cli/README.md b/cli/README.md index 444606b50..09dcbd27e 100644 --- a/cli/README.md +++ b/cli/README.md @@ -55,4 +55,20 @@ cd /usr/share/FreshRSS ./cli/export-opml-for-user.php --user username > /path/to/file.opml.xml ./cli/export-zip-for-user.php --user username ( --max-feed-entries 100 ) > /path/to/file.zip + +./cli/user-info.php -h --user username +# -h is to use a human-readable format +# --user can be a username, or '*' to loop on all users +# Returns a * if the user is admin, the name of the user, the date/time of last action, and the size occupied +``` + + +## Unix piping + +It is possible to invoke a command multiple times, e.g. with different usernames, thanks to the `xargs -n1` command. + +Example showing user information for all users which username starts with 'a': + +```sh +./cli/list-users.php | grep '^a' | xargs -n1 ./cli/user-info.php -h --user ``` -- cgit v1.2.3