Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Lubuntu - script for "recently used" files

  1. #21
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    5,857
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu - script for "recently used" files

    Quote Originally Posted by Kevin McCready View Post
    I ran
    sudo find * -ctime -1 -type f
    ...
    What was your reasoning behind including sudo? My feeling is that one shouldn't sudo unless it is really needed.

    Anyway, nice to see you got what you wanted
    de gustibus et coloribus non est disputandum -- Wiktionary

  2. #22
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Lubuntu - script for "recently used" files

    Quote Originally Posted by vasa1 View Post
    What was your reasoning behind including sudo? My feeling is that one shouldn't sudo unless it is really needed.

    Anyway, nice to see you got what you wanted
    It was my suggestion, explained in post #4. I use it to be able to find files and directories, where the normal user account has no permission. (I don't think find will do any harm with root permissions.)

  3. #23
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    5,857
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu - script for "recently used" files

    Quote Originally Posted by sudodus View Post
    It was my suggestion, explained in post #4. I use it to be able to find files and directories, where the normal user account has no permission. (I don't think find will do any harm with root permissions.)
    Okay, got it. I don't have another user set up and wouldn't know about find accessing those files but I haven't needed sudo to find system files. And my comment was just about being more cautious because sudo persists for a while and not about sudo find, per se.
    de gustibus et coloribus non est disputandum -- Wiktionary

  4. #24
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    5,857
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu - script for "recently used" files

    Quote Originally Posted by schragge View Post
    Would this do the trick?
    Code:
    find -ctime -1 -type f -exec bash -c 'select f;do [[ -n $f ]]&&xdg-open "$f"||exit;done' _ '{}' +
    Nice!

    I combined it with your earlier code
    Code:
    find -L ~/D{esktop,ocuments,ownloads} -type f -atime -3
    to get
    Code:
    find ~/{Documents,Desktop,Downloads,Music} -ctime -1 -type f -exec bash -c 'select f;do [[ -n $f ]]&&xdg-open "$f"||exit;done' _ '{}' +
    de gustibus et coloribus non est disputandum -- Wiktionary

  5. #25
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    1,867
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: Lubuntu - script for "recently used" files

    Quote Originally Posted by Kevin McCready View Post
    Hoping someone might be able to write a little script which I can run from the console.

    It would display the latest 15-20 files I've used. It would let me open the file by typing in the number of the file in the list generated.

    Because I run LXDE in lubuntu, it doesn't have a separate "recently used" files option and the file manager consistently misses files I've opened lately.
    Define "latest 15-20 files I've used" first. Even with "heavier" desktop environments, this only concerns files explicitly opened by the environment's own apps, and duly noted (in ~/.kde/share/apps/RecentDocuments/, for instance). And these environments are somewhat heavier for a reason...

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

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