Re: [PLUG] Can't find a file - now Permission on ./.cache/dconf
On Fri, Sep 12, 2014 at 08:46:10AM -0400, Fred James wrote: > John Jason Jordan wrote: > > Michael Rasmussen dijo: > >> ls -l ./.cache/dconf will reveal. > > ls -l ./.cache/dconf > > ls: cannot open directory ./.cache/dconf: Permission denied > > > Just to be clear > ls -l directoryname > ls -l > are different ... > the first is asking for a listing of the contents of directoryname > the second is asking for a listing of the current directory (PWD) and to be more clear ls -ld will show the directory itself, not the contents John may want to ls -ld ./.cache A handy use of it is ls -ld */ to show all the directories in your current directory. For example: michael@bivy ~/dl % ls -ld */ 6:46 2014-09-12 100% drwxrwxr-x 2 michael michael 4096 Jun 19 2013 book2/ drwxr-xr-x 3 michael michael 4096 May 29 2013 db-prefix-change/ drwxrwxr-x 2 michael michael 4096 May 10 2013 dbp-1.1.9/ drwxrwxr-x 2 michael michael 4096 Jun 1 2013 deblur/ drwxrwxr-x 5 michael michael 4096 Jun 20 2013 dedrm/ drwxr-xr-x 2 michael michael 12288 Jan 14 2014 eye-fi/ drwxr-xr-x 7 michael michael 4096 May 9 2013 libfixbuf-1.3.0/ drwxrwxr-x 2 michael michael 4096 Sep 22 2013 mw/ drwxr-xr-x 3 michael michael 4096 May 20 2010 p0flib/ drwxrwxr-x 31 michael michael 36864 Apr 27 12:38 pre-20121229/ drwxrwxr-x 7 michael michael 4096 May 12 2013 tweets/ drwxrwxr-x 2 michael michael 4096 Jan 12 2013 wordpressforphotographers-1.0.3/ drwxr-xr-x 11 michael michael 4096 May 9 2013 yaf-2.4.0/ -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity She tried to sit on my lap while I was standing up. ~ Raymond Chandler ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file - now Permission on ./.cache/dconf
John Jason Jordan wrote: > On Thu, 11 Sep 2014 20:58:17 -0700 > Michael Rasmussen dijo: > >> On Thu, Sep 11, 2014 at 08:43:30PM -0700, John Jason Jordan wrote: >>> However, although I found the file, I still get: >>> >>> find: `./.cache/dconf': Permission denied >>> >>> As well as the file I was looking for. Why does it do that? >> >> ls -l ./.cache/dconf will reveal. > ls -l ./.cache/dconf > ls: cannot open directory ./.cache/dconf: Permission denied > Just to be clear ls -l directoryname ls -l are different ... the first is asking for a listing of the contents of directoryname the second is asking for a listing of the current directory (PWD) Regards Fred James ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014 21:04:36 -0700 Dale Snell dijo: >On Thu, 11 Sep 2014 20:43:30 -0700 >John Jason Jordan wrote: > >> However, although I found the file, I still get: >> >> find: `./.cache/dconf': Permission denied >> >> As well as the file I was looking for. Why does it do that? > >You don't have permission to enter the directory "./.cache/dconf". >Therefore, find doesn't either, since you started it. It's just >letting you know that there was a directory it couldn't enter to >scan. Ah. Thanks. ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file - now Permission on ./.cache/dconf
On Thu, 11 Sep 2014 20:58:17 -0700 Michael Rasmussen dijo: >On Thu, Sep 11, 2014 at 08:43:30PM -0700, John Jason Jordan wrote: >> However, although I found the file, I still get: >> >> find: `./.cache/dconf': Permission denied >> >> As well as the file I was looking for. Why does it do that? > > >ls -l ./.cache/dconf will reveal. ls -l ./.cache/dconf ls: cannot open directory ./.cache/dconf: Permission denied ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014 20:43:30 -0700 John Jason Jordan wrote: > However, although I found the file, I still get: > > find: `./.cache/dconf': Permission denied > > As well as the file I was looking for. Why does it do that? You don't have permission to enter the directory "./.cache/dconf". Therefore, find doesn't either, since you started it. It's just letting you know that there was a directory it couldn't enter to scan. --Dale -- "That is what I like! Little things hitting each other!" -- Napoleon Bonaparte, "Time Bandits" signature.asc Description: PGP signature ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file - now Permission on ./.cache/dconf
On Thu, Sep 11, 2014 at 08:43:30PM -0700, John Jason Jordan wrote: > However, although I found the file, I still get: > > find: `./.cache/dconf': Permission denied > > As well as the file I was looking for. Why does it do that? ls -l ./.cache/dconf will reveal. -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity Nothing is more dangerous to your photographs than a drummer with a copy of Photoshop. ~ Zack Arias ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014 19:58:52 -0700 Michael Rasmussen dijo: >I used mtime, for modified. atime, for accessed, returned too many >results becuase "accessed" is a pretty promiscous descriptor. > >As the man page says: > > Numeric arguments can be specified as > +n for greater than n, > -n for less than n, > n for exactly n. > >Your examples just specified files accessed 10 days ago - nothing >newer or older. There was my mistake! I interpreted the man page as meaning that 10 meant ten or fewer, not equal to. When I changed it to -11 it found the file I was looking for. However, although I found the file, I still get: find: `./.cache/dconf': Permission denied As well as the file I was looking for. Why does it do that? ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, Sep 11, 2014 at 12:32:54PM -0700, John Jason Jordan wrote: > I have read the man page for find, and googled, but I continue to fail. > > I am looking for a file created no more than ten days ago that is > an .odt file. It is somewhere in ~/, but which folder I put it in > escapes me. I need this file urgently. > > The following command ought to work according to the man page: > > find -atime 10 /home/jjj/*.odt > > Can someone please help? The 10 indicates 10 days ago. As you already know the * needs to be escaped. Here's an example from my system: It is amazing how complete is the delusion that beauty is goodness. ~ Leo Tolstoy Oops, wrong paste. michael@bivy ~ % find . -mtime -30 -name \*jpg 19:38 2014-09-11 100% ./dl/bistro_maison_dessert.jpg ./dl/camera.jpg ./10Best/keepers/2012-10h.jpg Commentary on the observations above. I used mtime, for modified. atime, for accessed, returned too many results becuase "accessed" is a pretty promiscous descriptor. http://www.linux-faqs.info/general/difference-between-mtime-ctime-and-atime You'll note my numeric argument includes -30 for less than 30 days. As the man page says: Numeric arguments can be specified as +n for greater than n, -n for less than n, n for exactly n. Your examples just specified files accessed 10 days ago - nothing newer or older. This help? -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity If people knew how hard I worked to gain my mastery, it wouldn't seem so wonderful. ~ Michelangelo ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, Sep 11, 2014 at 5:53 PM, John Jason Jordan wrote: > On Thu, 11 Sep 2014 16:25:05 -0700 > Dick Steffens dijo: > > >How about piping it to grep with the name of the file you're looking > >for? > > > > find -maxdepth 5 -atime +10 -name \*.odt | grep nameoffile.odt > > I can't remember the exact name of the file. > Luckily the computer remembers it exactly :) ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014 16:25:05 -0700 Dick Steffens dijo: >How about piping it to grep with the name of the file you're looking >for? > > find -maxdepth 5 -atime +10 -name \*.odt | grep nameoffile.odt I can't remember the exact name of the file. ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 2014-09-11 at 16:09 -0700, John Jason Jordan wrote: > On Thu, 11 Sep 2014 14:08:31 -0700 (PDT) > Rich Shepard dijo: > > I finally got some results with: > > find -maxdepth 5 -atime +10 -name \*.odt > > Putting the escape in front of the * is necessary unless you quote the > pattern, but doing '*.odt' produced no results. The escape worked, > however. > > But the problem is that the above command delivered every .odt file on > my computer, which is many hundreds, if not thousands. If I change it > to just 10 (which is what the man page says to do), instead of +10 then > I get > > find: `./.cache/dconf': Permission denied > > Whatever that means. It means permission was denied. :) It's usually a good idea to tell 'find' where to start looking, as several people have noted in their examples. The basic pattern for 'find' is find WHERE_DO_I_START WHAT_DO_I_LOOK_FOR WHAT_DO_I_DO_WITH_IT personally, I find -mtime to be generally more useful than the other time specifiers. -- David Fleck ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014, John Jason Jordan wrote: > I finally got some results with: > > find -maxdepth 5 -atime +10 -name \*.odt John, Why limit the directory depth? If you don't know where you stuck it, look everywhere for it. Do you happen to know the filename? If so, try the locate command. > Putting the escape in front of the * is necessary unless you quote the > pattern, but doing '*.odt' produced no results. The escape worked, > however. Huh! Both single and double quotes work just fine here. Rich ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On 09/11/2014 04:09 PM, John Jason Jordan wrote: > On Thu, 11 Sep 2014 14:08:31 -0700 (PDT) > Rich Shepard dijo: > > I finally got some results with: > > find -maxdepth 5 -atime +10 -name \*.odt > > Putting the escape in front of the * is necessary unless you quote the > pattern, but doing '*.odt' produced no results. The escape worked, > however. > > But the problem is that the above command delivered every .odt file on > my computer, which is many hundreds, if not thousands. How about piping it to grep with the name of the file you're looking for? find -maxdepth 5 -atime +10 -name \*.odt | grep nameoffile.odt -- Regards, Dick Steffens ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014 14:08:31 -0700 (PDT) Rich Shepard dijo: I finally got some results with: find -maxdepth 5 -atime +10 -name \*.odt Putting the escape in front of the * is necessary unless you quote the pattern, but doing '*.odt' produced no results. The escape worked, however. But the problem is that the above command delivered every .odt file on my computer, which is many hundreds, if not thousands. If I change it to just 10 (which is what the man page says to do), instead of +10 then I get: find: `./.cache/dconf': Permission denied Whatever that means. ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014, Micah Cowan wrote: > What I think Martin and Rich noticed, but didn't explicitly point out, Micah, Thank you for clarifying. Martin and I assumed the differences from what John tried were obvious, but that's because we're familiar with find. Rich ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, Sep 11, 2014 at 12:32 PM, John Jason Jordan wrote: > The following command ought to work according to the man page: > > find -atime 10 /home/jjj/*.odt > > Can someone please help? What I think Martin and Rich noticed, but didn't explicitly point out, is that by specifying /home/jjj/*.odt like that, you're telling find to _only_ search the paths /home/jjj/*.odt. If you have .odt files in your home directory, the shell expands that into just the ones at the top-level of your home (no sub-dirs); otherwise, it searches only the non-existent file literally named /home/jjj/*.odt. In order to let find do its thing, you specify the DIRECTORY you want it to search as the path, and then (as Martin and Rich mentioned), use -name 'PATTERN' (the quotes are absolutely essential) to find all files matching that pattern, no matter how deep. Hope that helps! -mjc ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
On Thu, 11 Sep 2014, John Jason Jordan wrote: > I am looking for a file created no more than ten days ago that is an .odt > file. It is somewhere in ~/, but which folder I put it in escapes me. I > need this file urgently. An alternative form of the command assumes you're in your ~/ directory: find . -name "*.odt" The '.' means start with the current directory. Rich ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Can't find a file
Hi there, : I have read the man page for find, and googled, but I continue to : fail. It isn't an easy thing to grok and master. Takes a while, but it is worth it. Thanks for asking. : I am looking for a file created no more than ten days ago that is : an .odt file. It is somewhere in ~/, but which folder I put it in : escapes me. I need this file urgently. : : The following command ought to work according to the man page: : : find -atime 10 /home/jjj/*.odt Try this: find /home/jjj/ -type f -ctime -10 -name '*.odt' -type f means only things that are real files -ctime -10creation time (stat.ctime) 10 days ago or more recent -name '*.dot' fnmatch(3) style string match for filename I like find. -Martin ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug