dm
Publicado por Perfil removido (última atualização em 09/02/2017)
[ Hits: 1.907 ]
dm = dtach manager
Script utilizado para facilitar o uso do programa dtach, que tem a mesma função de attach do Tmux so que sem multiplexer.
Sintaxe:
dm *nome* *programa
Exemplo
dm irc irssi # inicia irssi com um FIFO em /tmp/dtach/irc
<Ctrl + f>
dm irc # Volta a sua sessão do irssi
#!/bin/sh # dtach manager # simplifies communication with dtach by removing options i don't use, # settings nice defaults i can use and automate socket creation # it takes the following args # -h -- list usage, can also be show by just invoking dm # -l -- lists sockets by reading all folders inside /tmp/dtach # -d -- deletes a socket, used to remove dead sockets that weren't removed # <alias> -- name that will be show in dm -l # [command] -- name of the program, this is only necessary in the first time # in the following times it will read /tmp/$NAME-socket and will open in the # correct application, like << dm mail mutt >> then << ctrl-z >> , then typ # ing << dm mail >> will open mutt anways CMD="$1" printusage() { printf "%s [-hl] [-d alias] <alias> [command]\n" "$(basename "$0")" } listsockets() { for socket in /tmp/dtach/*; do printf "%s\n" "$( basename "$socket")"; done } if [ -z "$1" ]; then printusage exit 1 fi if [ ! -d /tmp/dtach ]; then mkdir /tmp/dtach fi case "$CMD" in -h) printusage ;; -l) listsockets ;; -d) rm -fv /tmp/dtach/"$2" ;; *) NAME="$1" PROGRAM="$2" exec dtach -A /tmp/dtach/"$NAME" -e "^f" "$PROGRAM" ;; esac
Formatar disquetes msdos & ext2.
Ajuda a usar o comando ln [SCRIPT]
Shell Script para Guia Foca Linux
Fakemail anônimo - sem uso de SMTP
Nenhum comentário foi encontrado.
Atualizar o macOS no Mac - Opencore Legacy Patcher
Crie alias para as tarefas que possuam longas linhas de comando - bash e zsh
Criando um gateway de internet com o Debian
Configuração básica do Conky para mostrar informações sobre a sua máquina no Desktop
Aprenda a criar músicas com Inteligência Artificial usando Suno AI
Instalando e usando o Dconf Editor, o "regedit" para Linux
Como instalar o navegador TOR no seu Linux
Problema no audio do GoogleMeet, Zoom e streamyard (0)
O que eu faço com o pen drive de 200mb? (9)
Não consigo conectar WiFi USB (5)
NagiosQL "quebran... ao tentar importar arquivos do Nagios Core (0)
Log: core: Interactive#t... error - IOError closed stream (1)