https://levelup.gitconnected.com/20-terminal-commands-that-every-developer-should-know-f0d35e60f44d
Arquivo da tag: Terminal
The Easy Way to Prettify Your Terminal
Remover todos os arquivos de DS_Store
Selecione Aplicativos > Utilitários para iniciar o Terminal.
Insira o seguinte comando do UNIX:
sudo find / -name “.DS_Store” -depth -exec rm {} \;
Quando solicitado por uma senha, insira sua senha de administrador do Mac OS X.
Não foi possível obter acesso exclusivo ao directório de administração (/var/lib/dpkg/)
https://www.vivaolinux.com.br/topico/Iniciantes-no-Linux/Impossivel-criar-acesso-exclusivo
O arquivo /var/lib/apt/lists/lock impede que uma segunda instância do programa seja aberta. Provavelmente o PC foi reiniciado e o arquivo de lock permaneceu no diretório ou uma outra instância do programa está em execução.
Verifica se outra instância do apt-get está em execução:
ps aux | grep apt
Se tiver anota o PID do arquivo e mata o processo:
kill pid-do-arquivo
Linux detalhamento das permissões
Your terminal never felt this good before
Programa da iTerm2
Criando e editando .svnignore pelo terminal
svn:ignore is a great way to exclude certain files or folders from being added to your subversion repository. Typically I’ll manage this via an IDE plugin like subclipse (in Eclipse), but if you want to do it via the terminal instead (bash)…here’s how.
Crappy way
You can add single values to your svn:ignore by running this command either at the root of your project or wherever directory you want the ignore to take effect:
svn propset svn:ignore "*.project" .
However that command seems not only to add an ignore rule, but also it clears any rules you may have had on that directory and only inserts the single rule you just specified. No good.
Better way
There are a couple of ways to enter multiple ignore values into your ignore file, I like simply opening up the ignore editor. Try this command:
svn propedit svn:ignore .
If you get the following error it means you haven’t associated an editor with svn:ignore
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no ‘editor-cmd’ run-time configuration option was found
You can quickly associate the editor with nano (or another editor of your choice) by running:
export SVN_EDITOR=nano
That’s not ideal as it’ll only work in the current bash session, when you close your terminal window that export will be lost. The best bet is to add it to your ~/.bash_profile (or ~/.bash_login).
cd ~
nano .bash_profile
export SVN_EDITOR=nano
Now you’ll always be able to edit your svn:ignore file. So let’s try again:
svn propedit svn:ignore .
Nano (or whatever editor you specified) should open allowing you to enter whatever you want 🙂
Here’s a simple list of mine:
*.DS_Store
*.project
*.sublime-project
*.sublime-workspace
htdocs/WEB-INF
If you actually want to see all your files (including those that you’ve ignored) via the terminal, run:
svn status --no-ignore
Externals
Note that you can also edit any svn:externals using the same technique.
svn propedit svn:externals .
Remember that you need to be in the location of the directory that contains any externals for this to work properly.
TMUX – MELHORANDO A EXPERIÊNCIA COM O TERMINAL
Control + b : comando principal, antecede a todos os outros
Prefixo + d : sair da sessão sem desligar o tmux
Prefixo + c : nova janela;
Prefixo + , : renomear a janela atual;
Prefixo + w : selecionar uma janela;
Prefixo + n : próxima janela;
Prefixo + f : procurar uma janela;
Prefixo + z : suspende o cliente tmux;
Prefixo + # : lista todos os buffers;
Prefixo + : : abre o prompt de comando do tmux;
Prefixo + & : fechar uma janela;
Prefixo + ? : lista todos os atalhos (bindings);
Prefixo + ” : dividindo horizontalmente uma janela ou quadro em dois quadros;
Prefixo + % : dividindo verticalmente uma janela ou quadro em dois quadros.
https://www.vivaolinux.com.br/dica/tmux-melhorando-a-experiencia-com-o-terminal