Last active
May 22, 2016 14:15
-
-
Save lucianobezerra/540986 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pegar o retorno de uma listagem obtida pelo GREP, lê o conteúdo de cada arquivo da listagem e gravar em outro arquivo | |
for i in `grep -l "TEXTO" /pasta/arquivo(s)`; do | |
cat $i >> destino.txt ; | |
done | |
Monitorar uma Listagem de Arquivos em um Diretório | |
while [ 1 ]; do clear; ls -l;sleep 1; done; | |
Pesquisar e mover arquivos criados/modificados ha mais de quatro dias | |
$ find . -mtime +4 -exec mv {} temp/ \; | |
Setar data do Sistema: | |
$ sudo date MMDDHHmmAAAA (MM = Mes, DD = Dia, HH = Hora, mm = Minutos, AAAA = Ano) | |
$ sudo hwclock --systohc (setar hora na BIOS) | |
Empacotar Arquivos com TAR | |
$ tar -cf arquivo.tar arquivo1 arquivo2 arquivo3 | |
Empacotar e Compactar Arquivos com TAR | |
$ tar -czvf arquivo.tar.gz arquivo1 arquivo2 arquivo3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment