dusko + howto   229

Text-Terminal-HOWTO
This document was originally written for real text terminals which were like monitors (with keyboards), but could only display text with a command line interface (no pictures). They were widely used to access mainframe computers in the late 1970's and 1980's but use of them declined in the 1990's and they are seldom used anymore. However much of this howto also applies to command-line interfaces on Linux PC's which are in wide use today. It's not about the user programs one might run on the command line, but about setting up, managing, and understanding the interface itself Such as using a monitor as a virtual (text-only) console, using a text-window in a GUI such as xterm, connecting to a remote computer over a network via ssh, telnet, etc., or even using software on another PC to turn it into a serial-port text-terminal. All these 4 methods are known as "text-terminal emulation". But unfortunately, the main emphasis in this howto is real text terminals and the coverage of emulation is inadequate for the first 3 methods of emulation mentioned above. The Keyboard-and-Console-HOWTO filled much this gap but it was written for Linux 2.0 and now needs rewriting (or merging into this Text-Terminal howto). A new author is needed that has time to do all this. For the seldom used real text-terminals, it explains how they work, explains how to install and configure them, and provides some info on how to repair them. This HOWTO also provides a brief overview of modern GUI terminals.
console  terminal  commandline  cli  howto  xterm  unix 
22 hours ago by dusko
Hoppla - Archiving System for Small Instiutions
Hoppla is an archiving solution that combines back-up and fully automated migration services for data collections in small office environments. The system allows user-friendly handling of services and outsources digital preservation expertise.
backup  archive  howto 
7 days ago by dusko
Growing a root file system ·
Power vm off
Create snapshot incase things go horribly wrong
Extend virtual drive size
Power vm on
Fdisk device (/dev/xvda)
Delete last partition
Create new partition using default values
Reboot vm
Resize LVM Physical Volume (pvresize /dev/xvda2)
Resize Logical Volume to fill new space (lvresize -l 100%VG /dev/VolGroup00/systemroot)
Resize filesystem (resize2fs /dev/VolGroup00/systemroot)
Reboot for good measure
Delete snapshot
virtualization  kvm  qemu  sysadmin  howto 
7 days ago by dusko
Clear DNS Cache in Linux (or BSD)
Had a slightly vexing issue the other day. During a migration the destination host ended up caching some stale DNS entries. I tried a quick restart of nscd to no avail, rebooted the VM, again no joy. Even overriding the host in /etc/hosts wasn’t working. Took a few minutes of digging but what did work was

nscd -i hosts

Just something to remember if you ever seem to have a stubborn caching issue.
networking  linux  bsd  howto 
7 days ago by dusko
Convert maildir to mbox
So how did I convert the maildir to mbox? I used formail which is provided by procmail.

for i in maildir/cur/*;do formail -I "Status: RO" <"$i" >>mbox;done
for i in maildir/new/*;do formail -I Status: <"$i" >>mbox;done

You will want to do that for each maildir (don’t forget the .Subfolder directories). And remember each “folder” or maildir would be a different mbox file. So if you wanted to save sent mail as well …

for i in maildir/.Sent/cur*;do formail -I "Status: RO" <"$i" >>sent;done
for i in maildir/.Sent/new/*;do formail -I Status: <"$i" >>sent;done
mailserver  email  reference  howto  terminal  cli  shell  unix  script  sysadmin 
7 days ago by dusko
tmux - Making vim use the alternate screen - Super User
Confirm this as follows (remember that ^[ must be entered as a control character, e.g. Ctrl-v followed by Escape):

less /etc/hosts # should use alternate screen (desired)

less -X /etc/hosts # should leave it's output on screen (undesired)

echo -n "^[[?1049h"; less -X /etc/hosts; echo -n "^[[?1049l"
# should use alternate screen (desired)

If that last command gives the desired behaviour with less. Try the same approach with vim:

echo -n "^[[?1049h"; vim /etc/hosts; echo -n "^[[?1049l"
# should use alternate screen (desired)
xterm  terminal  tmux  screen  vim  vi  cli  x11  xorg  unix  script  reference  howto 
8 days ago by dusko
terminal - How to hide fullscreen CLI program output in xterm on FreeBSD? - Unix & Linux Stack Exchange
FreeBSD's termcap definition for "xterm" omits the alternate-screen escape sequence.
xterm  terminal  x11  xorg  tips  howto  freebsd  unix 
15 days ago by dusko
Unix Tricks
I have marked with a * those which I think are absolutely essential
Items for each section are sorted by oldest to newest.

mmb.pcb.ub.es/~carlesfe/unix/tricks.txt
unix  terminal  shell  tips  commandline  cli  howto  reference  vi  vim  tool  grep  networking 
4 weeks ago by dusko
My customized DWM window manager
Mainly as an addition it includes some patches like:
- systray (patched)
- dzen2 status bar (has an update to dwm.c in order to toggle visibility)
- restart with recompilation support while keeping all active windows running
wm  windowmanager  x11  xorg  howto  reference  dotfiles 
4 weeks ago by dusko
Regex Tutorial - Non-Printable Characters
Non-Printable Characters
You can use special character sequences to put non-printable characters in your regular expression. Use \t to match a tab character (ASCII 0x09), \r for carriage return (0x0D) and \n for line feed (0x0A). More exotic non-printables are \a (bell, 0x07), \e (escape, 0x1B), and \f (form feed, 0x0C). Remember that Windows text files use \r\n to terminate lines, while UNIX text files use \n.

In some flavors, \v matches the vertical tab (ASCII 0x0B). In other flavors, \v is a shorthand that matches any vertical whitespace character. That includes the vertical tab, form feed, and all line break characters. Perl 5.10, PCRE 7.2, PHP 5.2.4, R, Delphi XE, and later versions treat it as a shorthand. Earlier versions treated it as a needlessly escaped literal v. The JGsoft flavor originally matched only the vertical tab with \v. JGsoft V2 matches any vertical whitespace with \v.

-------------------

\t = tab
\r = newline
\n = line feed (what is the difference between this and \r ?)

Remember that Windows text files use \r\n to terminate lines, while UNIX text files use \n.
regex  perl  programming  unix  unicode  reference  howto  tutorial 
4 weeks ago by dusko
Guide to Flowcharts in Graphviz
Flowcharts in Graphviz recreates the classic "How to play Pictionary" flowchart from Doghouse Diaries (http://www.thedoghousediaries.com/2659) using Graphviz.
graph  diagram  tutorial  howto  reference 
4 weeks ago by dusko
Sharing Folders With qemu/KVM
This is a small tutorial on how to share folders between host and guest machine with qemu/KVM virtualization.
qemu  kvm  virtualization  tips  howto 
10 weeks ago by dusko
freebsd-zfs-manual-install: Assorted scripts and instructions on how to set up a dual-boot between Arch Linux on ext4 and FreeBSD on ZFS
Assorted scripts and instructions on how to set up a dual-boot between Arch Linux on ext4 and FreeBSD on ZFS.
freebsd  linux  zfs  script  howto  reference 
10 weeks ago by dusko
How do you organize your $HOME directory? | Lobsters
mftrhu

I... don’t. Mind you, I have been trying, but I’d probably need to have at it for a week straight to remove/organize all the cruft that has been accumulating over the last few years.

I have sketched a tentative folder layout, though, which is in use on my netbook (and partially on my laptop):
...
====
ricardbejarano:
My $HOME directory contains some config files, a Desktop folder (where I keep everything of value) and a Downloads folder, which is sort of an inbox of things to review.

...

I don’t think your system for file org is much important, but rather sticking to it and using it daily. I’m writing this off my memory, because I know where everything is and that’s what makes it productive.
unix  cli  commandline  shell  terminal  dotfiles  reference  howto  productivity 
december 2019 by dusko
Learn LaTeX in Y Minutes
Learn X in Y minutes
Where X=latex
tex  latex  tutorial  howto  reference 
november 2019 by dusko
Central Mail Hub - The /etc/sendmail.mc file
Instead of having each individual server or workstation in a network handle its own mail, it can be advantageous to have powerful central server that handles all mail. Such a server is called a Mail Hub. The advantage of a Central Mail Hub is:

All incoming mail is sent to the hub, and no mail is sent directly to a client machine.

All outgoing mail from clients is sent to the Hub, and the Hub then forwards that mail to its ultimate destination.

All outgoing mail appears to come from a single server and no client's name needs to be known to the outside world.

No client needs to run a sendmail daemon to listen for mail.
sendmail  mailserver  howto  reference  smtp 
september 2019 by dusko
Search QF header files for an email address in Sendmail logs
Search QF header files for an email address, identify corresponding df counter-part, and move both of the files to a looping message directory:

for x in `find . -type f -name “qf*” | xargs grep -l invalidaddress@domain.com | cut -b3-`; do y=d`echo $x | cut -b2-`; mv $x /root/loopingmessages; mv $y /root/loopingmessages/; done -
sendmail  mailserver  howto  script  log 
september 2019 by dusko
Tips for rooting cheap Chinese MediaTek MTK MT67xx (100s of models)
[ROOT] [GUIDE] Tips for rooting cheap Chinese MediaTek MTK MT67xx (100s of models)
android  mobile  tutorial  howto  reference 
september 2019 by dusko
« earlier      
per page:    204080120160

related tags

android  apache  applemacosx  archive  authentication  automation  awk  backup  bhyve  blog  book  bsd  c  centos  checklist  cli  cloning  cloud  coffee  comics  commandline  conference  config  console  cron  data  database  dd  diagram  diet  diy  dkim  dmarc  dns  documentation  dotfiles  dovecot  dump  ebook  ed  editor  email  english  fitneshealth  fonts  freebsd  freenas  graph  grep  hosting  howto  http  images  imap  internet  iscsi  journal  keyboard  kvm  latex  ldap  linux  log  mac  mailserver  mariadb  markup  migration  mobile  mta  mysql  nas  netbsd  networking  notebook  openbsd  opensource  pdf  perl  php  plaintext  postfix  postmaster  productivity  programming  projectmanagement  qemu  reading  recovery  reference  regex  restore  rhel  rsnapshot  rsync  samba  screen  script  security  sed  sendmail  server  shell  smtp  snapshot  spam  spf  ssh  ssl  staticsitegenerator  storage  svg  sync  sysadmin  tar  terminal  tex  text  tips  tls  tmux  tool  tutorial  typography  unicode  unix  utf8  versioncontrol  vi  vim  virtualization  visualization  vmware  web  webbrowser  webdevelopment  windowmanager  windows  wm  writing  x11  xorg  xterm  zfs  zimbra 

Copy this bookmark:



description:


tags: