![]() ![]() etc/apt//maarten-fonville-ubuntu-ppa-wily.list:deb wily main etc/apt/sources.list:deb wily-security multiverse etc/apt/sources.list:deb wily-security universe etc/apt/sources.list:deb wily-security main restricted etc/apt/sources.list:deb wily-backports main restricted universe multiverse etc/apt/sources.list:deb wily-updates multiverse etc/apt/sources.list:deb wily multiverse etc/apt/sources.list:deb wily-updates universe etc/apt/sources.list:deb wily-updates main restricted ![]() Unless there are files that shouldn't be there, the output will be the same.Īn example output on my machine would be this: /etc/apt/sources.list:deb wily main restricted If you want a shorter but possibly only in 99.9% of all cases correct output that may search too much files (includes all /etc/apt/sources.list* files and directories, not only /etc/apt/sources.list and `/etc/apt//*), you could also use this: grep -r -include '*.list' '^deb ' /etc/apt/sources.list* no *.list.save files used for backup or others with illegal names. It searches really only all *.list files that will be parsed by apt, but e.g. This excludes commented lines as well as deb-src lines to enable source code repositories. I am surprised that the simplest but most effective way to get all enabled binary software sources together with the file they're specified in hasn't been posted yet: grep -r -include '*.list' '^deb ' /etc/apt/sources.list /etc/apt//įrom all processed files, this will print every line starting with deb. I needed a question on superuser to figure out the correct regex. If thenĮcho sudo apt-add-repository \'$\' #echo sudo apt-add-repository ppa:$USER/$PPA # Script to get all the PPA installed on a system Next stop: do that for the other repositories: #! /bin/sh When you call it with listppa > installppa.sh you get a script you can copy on a new machine to reinstall all PPA. ![]() ![]() Grep -o "^deb \ /\ " $APT | while read ENTRY doĮcho sudo apt-add-repository ppa:$USER/$PPA # listppa Script to get all the PPA installed on a system ready to share for reininstallįor APT in `find /etc/apt/ -name \*.list` do With a little cleanup I got a script that lists the PPAs, but not any other repository: #! /bin/sh ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |