Security and Technology

BORG – Terminal Based Search For Bash Snippets

Borg was built out of the frustration of having to leave the terminal to search and click around for bash snippets. Borg’s succint output also makes it easy to glance over multiple snippets quickly.

Search

borg “find all txt”

(1) Find and delete .txt files in bash [a] find . -name “*.txt” | xargs rm [b] find . -name “*.txt” -exec rm {} \; [c] $ find . -name “*.txt” -type f -delete(2) bash loop through all find recursively in sub-directories [a] FILES=$(find public_html -type f -name ‘*.php’) [b] FILES=`find public_html -type d`

Can’t find what you are looking for? Be a good hacker and contribute your wisdom to the hive mind – add your own snippets or tweak the existing ones.Install
The following releases only let you search, to use add/edit install from source, releases are coming soon.

brew install borg

For linux, download a release manually releases

wget http://ift.tt/2elHheh -O /usr/local/bin/borgchmod 755 /usr/local/bin/borg

Or download a release manually for Mac:

wget http://ift.tt/2dR5tsA -O /usr/local/bin/borgchmod 755 /usr/local/bin/borg

Rate results: worked
When you see a result that worked for you, you can use the worked command to give feedback:

borg worked 12

Once you do this the result will rank higher for similar queries – it is especially useful if you find a good result that you think are too down in the result list.Advanced usage
For more commands and their explanations, please see advanced usageHow does borg work?
The client connects to a server at ok-b.org, but you can host your own if you want to (see daemon folder).
Self hosting will become less appealing once people start contributing their own content to the database though.Explanation for ui

() denotes hits for your query

[] denotes snippets found for a given query

… under a [] means more lines to display (use the -f flag for full display, see more about usage below)

Download BORG http://ift.tt/2dR2BMl http://ift.tt/2aM8QhC

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s