alt texti execute the following command :-find / -type f -name fs-type -exec svnlook tree {} \; |egrep "/$"

the result is svnlook: Can't open file '/var/lib/svn/repos/b1me/products/payone/generic/code/core/db/fs-type/format': Not a directory svnlook: Can't open file '/var/lib/svn/repos/b1me/products/payone/generic/code/fees/db/fs-type/format': Not a directory

maybe we must make "find" command give us path without "db/fs-type/format" in other words we must clipping the output of "find command".... but how i can do this ???

  • Please use proper formatting in your texts. It's really hard to read otherwise. – joschi Sep 20 '10 at 7:03
  • 1. i want find all repository .... 2. i want find entire directory for all repository .... note : the result of execute step one more than 500 repositoy so i need method to execute step two by easy method – Mohammad AL-Rawabdeh Sep 20 '10 at 9:27

It is not the find command that is at fault here. The find command is doing exactly what you are telling it to do e.g. it is finding all occurrences of the regulare file named fs-type in the whole of your filesystem.

You are then passing the results of the find command to svnlook tree.

The svnlook tree command expects a directory as it's parameter not a regular file like you are giving it. The directory you pass to svnlook tree should have a file called format which contains the revision number of the repository this is why you get the error message above.

It is the svnlook command that is giving you the error message you are seeing. What you need to do is figure out which directory in the path /var/lib/svn/repos/ is the correct one to pass to svnlook.

You would also help yourself by reading some information on svn to better understand the system you are working with.


There is no easy way to find all svn repositorys

You can search for all .svn directories on a system and run svn info on them then inspect the output for "Repository Root:". If you have many projects in a common repository then the output of this will need passing through uniq thus

sudo find / -name .svn  -exec dirname {} \; | \
xargs svn info | grep "Repository Root:" | uniq \
sed 's/Repository Root: file:\/\///'

You'll get something like /var/svn/repos as output.

The above lists all the repositorys for projects scattered around your filesystem. You can then

svnlook tree /var/svn/repos |grep / to find what you want for each repository listed in the output from the command above.

The only problem with the method above is that if a directory tree has been deleted and it contained an project under svn control and the project was in a unique repository then you will not find it.

  • realy thank you for this information ... i will read more about this subject – Mohammad AL-Rawabdeh Sep 20 '10 at 10:07

You can use "-path" paramater with pattern you like


My understanding is that you want to skip the directory in your results.

You can do that with -path <path_to_skip> -prune parameters

  • you mean like this :- find / -type f -name fs-type -print -path <"/db/"> -prune ... if you mean this it is not work – Mohammad AL-Rawabdeh Sep 20 '10 at 9:33
  • No, no. I use angle brackets only to indicate that path_to_skip is placeholder for real path: -path ./dir/to/skip -prune. Anyway look at Iain's answer. – Casual Coder Sep 20 '10 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.