[Koha] Storage of Perl Scripts [Was: Orphaned Authority Records: Finding Them and Deleting Them]

Charles Kelley cmkelleymls at gmail.com
Wed Aug 5 14:35:57 NZST 2020


Hello, Alvaro!

    In our latest exchange, on 5 Aug. 2020, at 11:00 AM, you wrote:

You can use "locate" command to find files in linux
>
> #sudo updatedb (Updates locate index)
> #sudlo locate  remove_unused_authorities.pl
>

    bash reports that neither updatedb nor locate exists. At least, neither
exists in Debian Stretch.


> the script mentioned is in
>
> #/usr/share/koha/bin/migration_tools/
>

    Thank you. I finally found the Perl scripts that come with the initial
Koha installation.

For running you can go to that dir and do:
>
>  # sudo koha-shell YOURLIBRARY_INSTANCE
> This will change user environment to your koha user/instance
>
> # ./remove_unused_authorities.pl --test | grep -i delete
> (note the dot at the beginning if the string)
> The grep command helps you filter only the ones that can be deleted
> instead of all the authorities.
>
>   # ./remove_unused_authorities.pl --test | grep -i delete >
> /PathToAFIle/filename
> This will write all found records to file  /PathToAFIle/filename. You
> should have write privileges on destination folder for your kohaUser so you
> can try /temp/orphanauthors.txt
>
> You can also just do:
>
>  # ./remove_unused_authorities.pl
> to see what options the command has like delete orphaned records and check
> only certain types of authorities.
>

    However, when I tried executing it, I got an error message, to wit:

BEGIN failed--compilation aborted at ./remove_unused_authories.pl line 25.
>

    I guess we'll just have to live with the orphaned authority records for
the present.

At the end type "exit" to return to your normal linux user.
>
> Note that the script is CPU consuming.
>

    Thank you for the advisement. We'll run it after closing so that the
disruption will be minimal.

Hope helps
>

    Thanks.


-- 

    気を付けて。 /ki wo tukete/ = Take care.

    -- Charles.

    Charles Kelley, MLS
    PSC 704 Box 1029
    APO AP 96338

    Charles Kelley
    Tsukimino 1-Chome 5-2
    Tsukimino Gaadenia #210
    Yamato-shi, Kanagawa-ken
    〒242-0002 JAPAN

    +1-301-741-7122 [US cell]
    +81-80-4356-2178 [JPN cell]

    mnogojazyk at aol.com [h]
    cmkelleymls at gmail.com [p]

    linkedin.com/in/cmkelleymls <http://www.linkedin.com/in/cmkelleymls>
    Meeting Your Information Needs. Virtually.


More information about the Koha mailing list