Results 1 to 4 of 4

Thread: trash-cli: how to empty trash of another user

  1. #1

    Default trash-cli: how to empty trash of another user

    I am using openSUSE 13.1.

    I set up a cron job to empty trash at reboot:
    Code:
    @reboot empty-trash > /dev/null
    How do I specify what user's trash to empty? As far as I can tell it is emptying only the root trash.

  2. #2
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,048

    Default Re: trash-cli: how to empty trash of another user

    On Fri, 19 Dec 2014 22:06:01 +0000, chauncey7 wrote:

    > I am using openSUSE 13.1.
    >
    > I set up a cron job to empty trash at reboot:
    >
    > Code:
    > --------------------
    >
    > @reboot empty-trash > /dev/null
    >
    > --------------------
    >
    >
    > How do I specify what user's trash to empty? As far as I can tell it is
    > emptying only the root trash.


    What happens if you put it in the user's crontab rather than the system
    crontab?

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: trash-cli: how to empty trash of another user

    On 2014-12-19 23:06, chauncey7 wrote:
    >
    > I am using openSUSE 13.1.
    >
    > I set up a cron job to empty trash at reboot:
    >
    > Code:
    > --------------------
    >
    > @reboot empty-trash > /dev/null
    >
    > --------------------
    >
    >
    > How do I specify what user's trash to empty? As far as I can tell it is
    > emptying only the root trash.


    Well, it is that other user who has to write the cronjob as his own. If
    you delete his trash he may be mad at you.

    You could instead limit how mush disk space he is allowed to use, via
    disk quotas.


    To run system cron jobs as arbitrary users, you have to create a file
    under "/etc/cron.d/", which has a slightly different crontab syntax,
    specifying the user each job is to run as.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  4. #4

    Default Re: trash-cli: how to empty trash of another user

    That did the trick.
    Thanks.


    Quote Originally Posted by hendersj View Post
    On Fri, 19 Dec 2014 22:06:01 +0000, chauncey7 wrote:

    > I am using openSUSE 13.1.
    >
    > I set up a cron job to empty trash at reboot:
    >
    > Code:
    > --------------------
    >
    > @reboot empty-trash > /dev/null
    >
    > --------------------
    >
    >
    > How do I specify what user's trash to empty? As far as I can tell it is
    > emptying only the root trash.


    What happens if you put it in the user's crontab rather than the system
    crontab?

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •