Como esconder arquivos de uma certa extensão no PCManFM

1

Eu uso muito o latex no meu trabalho. A compilação de um arquivo latex gera muitos arquivos intermediários com extensões .log, .aux. Para evitar a desordem, gostaria de ocultar esses arquivos intermediários. Existe uma maneira de ocultar arquivos com base em sua extensão?

    
por elexhobby 07.02.2015 / 22:02

1 resposta

1

Editar, também me deparei com isso: link

Não estou familiarizado com o PCManFM, pois não uso uma GUI, mas se você ctrl + r executar um comando no diretório, poderá executar meu comando abaixo para ocultar os arquivos.

Para mostrar arquivos ocultos, você só precisa acessar ctrl+h .

Espero que ajude.

Você pode tentar algo assim se estiver interessado em uma abordagem fora do PCManFM:

find . \( -name "*.log" -o -name "*.aux" \) -exec sh -c 'mv "$1" ."${1#./}"' _ {} \;

Basicamente, estou procurando por qualquer arquivo na corrente diretamente que termine com .log ou .aux e renomeie adicionando um . na frente do nome para torná-lo um arquivo oculto. Eu faço uma substituição de string para remover o ./ do nome do arquivo antes da mudança, caso contrário ele tentará mover o arquivo para um diretório adicionando o . to ./ creating ../ .

Antes:

# ls -lh
total 0
-rw-r--r--. 1 root root 0 Feb  7 16:26 alt2.file
-rw-r--r--. 1 root root 0 Feb  7 16:27 alt3.alt
-rw-r--r--. 1 root root 0 Feb  7 16:27 alt4.nothing
-rw-r--r--. 1 root root 0 Feb  7 16:26 alt.test
-rw-r--r--. 1 root root 0 Feb  7 16:28 file1.aux
-rw-r--r--. 1 root root 0 Feb  7 16:28 file1.log
-rw-r--r--. 1 root root 0 Feb  7 16:28 file2.aux
-rw-r--r--. 1 root root 0 Feb  7 16:28 file2.log
-rw-r--r--. 1 root root 0 Feb  7 16:28 file3.aux
-rw-r--r--. 1 root root 0 Feb  7 16:28 file3.log

Depois:

# ls -lh
total 0
-rw-r--r--. 1 root root 0 Feb  7 16:26 alt2.file
-rw-r--r--. 1 root root 0 Feb  7 16:27 alt3.alt
-rw-r--r--. 1 root root 0 Feb  7 16:27 alt4.nothing
-rw-r--r--. 1 root root 0 Feb  7 16:26 alt.test

# ls -lha ## Add 'a' to see hidden files
total 8.0K
drwxr-xr-x. 2 root root 4.0K Feb  7 16:39 .
dr-xr-x---. 4 root root 4.0K Feb  7 16:35 ..
-rw-r--r--. 1 root root    0 Feb  7 16:26 alt2.file
-rw-r--r--. 1 root root    0 Feb  7 16:27 alt3.alt
-rw-r--r--. 1 root root    0 Feb  7 16:27 alt4.nothing
-rw-r--r--. 1 root root    0 Feb  7 16:26 alt.test
-rw-r--r--. 1 root root    0 Feb  7 16:28 .file1.aux
-rw-r--r--. 1 root root    0 Feb  7 16:28 .file1.log
-rw-r--r--. 1 root root    0 Feb  7 16:28 .file2.aux
-rw-r--r--. 1 root root    0 Feb  7 16:28 .file2.log
-rw-r--r--. 1 root root    0 Feb  7 16:28 .file3.aux
-rw-r--r--. 1 root root    0 Feb  7 16:28 .file3.log

Eu usei uma abordagem semelhante para responder a essa pergunta.

    
por 07.02.2015 / 22:46