dusko + commandline   324

charts - Command-line Unix ASCII-based charting / plotting tool - Stack Overflow
Is there a good command-line UNIX charting / graphing / plotting tool out there? I'm looking for something that will plot xy points on an ASCII graph.

Just to clarify, I'm looking for something that will output a graph in ASCII (like ascii-art style), so I can use it over an interactive shell session without needing X.

# data.txt is newline-separated
cat data.txt | eplot -M -x 'ChartFooTitle' -d 2 > /dev/null
graph  diagram  commandline  cli  terminal  visualization  ascii  plaintext 
8 weeks ago by dusko
rdumpfs -- rsync-based dump file system backup tool
== Why not use...

Obviously, there are many similar scripts, among which I have used
dirvish and rsnapshot before writing rdumpfs for keeping daily dumps.
Currently I use rdumpfs and borg.

* dirvish: Requires Perl with non-standard libraries. Cannot continue
partial backups. Complex configuration. No push backup.

* rsnapshot: Requires Perl. No date-based directory naming. Obscure
configuration. No push backup.

* pdumpfs: Requires Ruby. No special files. No remote backups.

* rsync-incr: No push backup.

* rdiff-backup: Requires Python. Old backups are not kept accessible in
the file system.

* duplicity: Requires Python. Backups are not kept accessible in the
file system.

* rsback: Requires Perl. No date-based directory naming.

* attic: Requires Python. Backups are not kept accessible in the
file system. Unmaintained.

* borg: Requires Python. Backups are not kept accessible in the
file system. Else highly recommended.

== When not use rdumpfs?

* You want encrypted backups (try borg, duplicity).
* You need incremental backups on a higher granularity than files (try
borg, bup, vac, dar).
* Your target doesn't support hardlinks/SSH/rsync (try duplicity).
* You want automatic expiry (try dirvish).
backup  rsync  snapshot  shell  commandline  cli  script  dump 
8 weeks ago by dusko
Here are some programs that I've written over the years. They're all written in C (one uses yacc) and run on Unix machines. They should be pretty portable, although I haven't gone to a lot of trouble to verify that. I distribute them under the MIT license.
software  shell  c  script  commandline  cli  tool 
8 weeks ago by dusko
bassclef - A static Web site generator built from stable and mature command-line tools
Bassclef is a command-line CMS built on a foundation of stable and mature shell utilities. It generates static Web pages from markdown text files, and eschews the use of databases.
staticsitegenerator  web  webdevelopment  commandline  cli  shell 
8 weeks ago by dusko
rsync examples
Backup to a central backup server with 7 day incremental

Backup to a spare disk

Mirroring vger CVS tree

Automated backup at home

Fancy footwork with remote file lists
rsync  backup  script  automation  howto  commandline  cli  mirroring 
8 weeks ago by dusko
Tardis - A backup system, similar to TimeMachine. Supports encrypted, incremental backups, with filesystem based recovery
A Time Machine style backup system.

Tardis is a system for making incremental backups of filesystems, much like Apple's TimeMachine.

Like TimeMachine, Tardis is aimed primarily at "live backups", namely a backup taken periodically, and available for quick recovery, typically stored on attached or online disks, or rather than being stored on archival backup media, such as tapes.

Tardis runs in a client/server mode, normally using a remote backup server (client and server can be the same machine). The server is relatively lightweight, and runs fine on a Raspberry Pi 2 or better machine.
backup  commandline  cli  terminal 
8 weeks ago by dusko
Show HN: Transity – Plain Text Accounting - Hacker News
> It's easy to get into a machismo thing where you regard the shell

Unspoken presumptions about how the CLI is harder to use and GUIs somehow more natural (because graphics) is usually a sign of not understanding neither.

I spend most of my time in my editor and at the command line because it's easier to use. I don't have to learn thousands of little clickable widgets just to get the job done (which tend to change with every version of the tool).

That said, there are good and bad user interfaces with CLI tools, just like with GUI tools.

What's more interesting however, is how tools shape the way you think. CLI tools tend to feel like processing data, whereas with GUI tools you feel like maneouvering a large machine. The former tends to lead to fewer mistakes at scale.
shell  commandline  terminal  cli  finance 
10 weeks ago by dusko
The Terminal - furbo.org
I’ve been using the Unix command line since 1983 and like most software developers, the Terminal app is a permanent fixture in my Dock. Over the years I’ve learned a lot of things that make working in this environment more productive, but even old dogs like me are constantly learning new (http://apple.stackexchange.com/questions/5435/got-any-tips-or-tricks-for-terminal-in-mac-os-x) tricks (http://serverfault.com/questions/7346/what-are-useful-command-line-commands-on-mac-os-x).

As much as I love them, these long “trick lists” on Stack Overflow have a problem: they’re poorly organized with little narrative describing why you’d want to use a technique. This long homage to the command line is my attempt to remedy that situation.

Note: I originally learned the shell using the newfangled csh (which was a huge improvement over the original sh.) When I first started using Mac OS X, I tweaked it to use tcsh because that’s what I knew and loved. Over time, I gave up using these tweaks and started using the default shell: bash. The following examples assume that you’re doing the same.
terminal  howto  cli  commandline 
11 weeks ago by dusko
Moving a process to another terminal
I’ve always wanted to be able to move a process from one terminal to another. For example if I’ve started a long-running foreground process (such as irssi or scp) outside of a screen and I have to log out my local terminal. I looked around and there doesn’t seem to be any way to do this.

There is a program called retty that I found later on that sort of does this, but it only closes and re-opens stdin/out et al. It doesn’t seem to do full terminal handling. Nor does it seem to detach the original terminal. It only allows you to peek into the process, control it for a bit, and then hand it back. If you shut down the original terminal you’re still screwed.
terminal  shell  cli  commandline  sysadmin 
october 2018 by dusko
libcaca – Caca Labs
libcaca is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals. It is not unlike the famous ​AAlib library, with the following improvements:

Unicode support
2048 available colours (some devices can only handle 16)
dithering of colour images
advanced text canvas operations (blitting, rotations)

Libcaca works in a text terminal (and should thus work on all Unix systems including Mac OS X) using the S-Lang or ncurses libraries. It also works natively on DOS and Windows.
terminal  shell  documentation  images  plaintext  commandline  cli 
october 2018 by dusko
Learn Enough to Be Dangerous
This is a story about the single most valuable skill you can learn in the 21st century. At Learn Enough to Be Dangerous, we believe that learning this skill can benefit at least a billion people, and probably more. It is our hope to reach and inspire as many of these people as possible—and we want you to be a part of it.
coding  learning  commandline  cli 
october 2018 by dusko
taskbook - Tasks, boards and notes for the command-line habitat
By utilizing a simple and minimal usage syntax, that requires a flat learning curve, taskbook enables you to effectively manage your tasks and notes across multiple boards from within your terminal. All data are written atomically to the storage in order to prevent corruptions, and are never shared with anyone or anything. Deleted items are automatically archived and can be inspected or restored at any moment.
console  shell  plaintext  gtd  productivity  commandline  cli  notebook 
october 2018 by dusko
castty - A CLI tool to create screencasts of your terminal, for the web
CasTTY is a program similar to ttyrec and asciinema that makes it easy to create audio-enabled, terminal-based screencasts for publication on webpages. It was originally a fork of ttyrec, but has since effectively been rewritten from scratch.

There may be bugs. Feel free to contribute patches or file an issue!

You probably want to see what you get after you use this.
commandline  terminal  cli  documentation 
september 2018 by dusko
Rsyncrypto - Rsync Friendly File Encryption
backup  rsync  encryption  cli  commandline  shell 
september 2018 by dusko
text - Creating diagrams in ASCII - Unix & Linux Stack Exchange
I found another answer; I am not sure it is fully usable, but remember that GNU roff (groff) has a processor for the Pic language as well as an ascii postprocessor; thus you may have a try at something like that (if you use Linux, everything should probably already be installed). Write a file called test.roff containing:

box "box1";
box "box2";

Then type: groff -Tascii -p test.roff, and you should get:

+------+ +------+
| +-----| |
| box1 | |box2 |
+------+ +------+

One might want to remove control characters by using groff -Tlatin1 -P-c -P-b -P-u
diagram  ascii  plaintext  socumentation  commandline  cli  shell 
september 2018 by dusko
Can you get cp to give a progress bar like wget? - Chris Lamb
This is cool and all, but the overhead of strace make this not very useful. rsync -av shows a progress bar. You can also get a progress bar if you use scp locally. Yes, scp supports local file transfers without using any network or connecting to a local sshd instance.
shell  commandline  cli 
august 2018 by dusko
Backups - USAIL
Unix System Administration Independent Learning - USAIL
backup  sysadmin  unix  cli  commandline  shell 
march 2018 by dusko
SMTP, testing via Telnet - FreeBSDwiki
When troubleshooting problems with SMTP service - your own, or others - it is frequently very helpful to be able to "speak" to the SMTP server directly, rather than going through a mail client which won't necessarily tell you exactly what the SMTP server is saying. You can easily do this with the telnet client. Note that many ISPs do not allow outbound connections on port 25 to any SMTP server but their own - if you get timeouts when trying to connect to port 25, you should try port 587, which is the standard ESMTP port. (Port 587 connections normally require SMTP AUTH, which is covered below.)
mailserver  sendmail  smtp  cli  commandline  shell 
march 2018 by dusko
Exorcising the Evil Alternate Screen
When I view a document (with vi, view, man, who knows what else) and then exit out of the document, the screen clears. This bugs the crap out of me. ----> How to avoid this.
Terminal Program vs. Terminal Type

Some background: your terminal's behavior is controlled at two different places, and it's important to know the difference.

First, there's the terminal program you're running (usually on your local machine, though with remote X you can run terminal programs remotely, displaying to your machine). This is something like xterm, gnome-terminal, rxvt, eterm, or konsole.

Second, there's your terminal type. The terminal type is a description of which escape sequences do what: like ctrl-L clears the screen, ESC-[-H puts the cursor "home" (at the top left), ESC-[-1-m makes text bold, and so forth. The terminal type is what you see when you look at $term or $TERM in your shell or your environment variables. If you're remotely logged in to another machine, this is set on the remote system, wherever your shell is (and programs such as vi and man are).

What others say:
This is what a good response to "Vim clobbers my scrollback buffer" looks like.


After looking at a man page at the command line and pressing Q to quit it the screen clears. Or, you just exited vi or quit less and the screen clears. Here's how to stop the screen from clearing.
vi  terminal  shell  cli  xorg  x11  commandline  ssh 
december 2017 by dusko
Understanding the bin, sbin, usr/bin, usr/sbin split
> I see that busybox spreads it's links over these 4 directories.
> Is there a simple rule which decides which directory each link lives in.....
> For instance I see kill is in /bin and killall in /usr/bin.... I don't
> have a grip on what might be the logic for that.
cli  commandline  terminal  shell  unix 
december 2017 by dusko
pigshell - The missing shell for the web
Pigshell is a pure client-side Javascript app running in the browser, which presents resources on the web as files. These include public web pages as well as private data in Google Drive, Dropbox, Facebook and even your desktop. It provides a command line interface to construct pipelines of simple commands to transform, display and copy data.
cli  commandline  terminal  web 
december 2017 by dusko
HOWTO: Successfully using Mutt in an Exchange 2010 Environment
I recently started using Mutt as my full time mail client at the office and have found (through searches and tinkering) a way to use Mutt in conjunction with Wyrd (ncurses front end for Remind) to effectively manage calendar events sent to me via email. In addition, I also found a way to asynchronously create an aliases file from an Active Directory query. The only thing I've found that I can't do with this setup is view shared Exchange calendars. For that I still have to use OWA. I do not do much of it, though, so I'm OK with that for now. These scripts are far from perfect but they work, which was my goal.

Download the scripts from: https://gist.github.com/5527716 or clone them from here: https://gist.github.com/5527716.git
mutt  plaintext  cli  commandline  shell 
december 2017 by dusko
Backup and Recovery with Native OS Tools
* Linux Complete Backup and Recovery HOWTO - Charles Curley

* Linux Complete Backup and Recovery HOWTO - Charles Curley

* Chapter 8. Backup and Restore Procedures - Charles Curley

* Linux / UNIX Tar Full and Incremental Tape Backup Shell Script

* Full System Backup with rsync - ArchWiki

* FreeBSD - Backup Basics

* FreeBSD UFS/ZFS Snapshot Management Environment

* Howto: Backup and restore your system! (Ubuntu forums)

* Bare Metal Recovery by Charles Curley

* Creating a clone of current server

* Cloning a server in RHEL 4

* Copying config files from one RHEL server to another

* Cloning Hard Drives with GNU/Linux

* DAR -- Disk ARchive

* tar -- Unix Tape Archiver

* Tar options for bare metal recovery

* Easy Automated Snapshot-Style Backups with Linux and Rsync

* How To Backup Your Entire Linux System Using Rsync

* Rsnapshot

* Clonezilla

* rclone - rsync for cloud storage and local filesystem

* Disk and Partition Backup and Cloning

* Cloning systems, disks and partitions

* Cloning parition table on a new disk

* BackInTime

* TimeShift - functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS.

* SUSE Backup and Restore

* Usage of Knoppix with Partimage

* Solaris Backup/Restore

* Solaris snapshots

* Usage of Relax-and-Recover on RHEL

* GNU tar: an archiver tool

* cpio command

* Cloning harddrives and partitions using dd

* DD Command

* GNU ddrescue

* Linux LVM-based Snapshots

* Recovery of LVM partitions

* Back Up (And Restore) LVM Partitions With LVM Snapshots

* Perl and Shell Backup Scripts

* luckyBackup - a powerful, fast and reliable backup and sync tool

* rotate-backups

* bash-backup-rotation-script

* Shell script to mirror backups to another server in pull mode using rsync

* Continuous Archiving for Postgres

* Macrium Reflect - Free backup, disk imaging and cloning solution for personal and commercial use

* storeBackup's Top Features
Restore easily - even without storeBackup! The most important aspect of a backup tool is easy restoring from a transparent (native) storage format.
Copies / compresses files to another disk and generates backups with time stamps while saving space by recognizing files with identical contents (even if renamed or copied) and hardlinking them (so each backup is totally complete, independent and autonomous)
Detects identical files in different, independent backups (eg. of different computers)
Splits big image files (from e.g., TrueCrypt, mbox, Xen, KVM, VMware, etc.) or complete devices into small pieces and saves only differences to existing backups, thereby saving space and time
Sophisticated possibilities for including and excluding files and directories.
Support of sparse files.
Supports isolated incremental backups (e.g., when travelling with a laptop) and later integration in master backup.
Supports time shifted replication of backups to additional other disks / locations, even for complex schemes.
Supports checking of backups via md5 sums to eg. recognize bit rot of the hard disk.
Enables checking of (old) files in the source directory with md5 sums in the backup to eg. recognize bit rot of the hard disk.
Fast backups even over slow or high latency network connections.
Contains an entire suite of backup-related tools.

>> storeBackup

>> storeBackup Documentation

✭ Copy hard disk or partition image to another system using a network and netcat (nc)

* Shell Script To Dump All MySQL Databases Every Hour To NAS Storage

* Back Up and Restore MySQL Server (MariaDB) Databases

* MySQL Server (MaridaDB) Backups

* MySQL Backup Bash Shell Script

* Shell script to backup all db's (MySQL Server / MariaDB)

✭ How do I clone an OpenLDAP database - Stack Overflow

* Keep a Backup of Installed Packages
You might prefer to have a clean system on reinstall but sometimes it is nice to reinstall applications from a previous machine/setup. Keeping a backup list of packages will make this a snap. Just give your package manager a list of all the packages you want it to install and let it rip.
- Here are the backup and restore methods for each of the major distros/package managers.










backup  linux  freebsd  sysadmin  tar  rsync  perl  snapshot  lvm  config  zfs  cli  commandline  shell  python  from notes
december 2017 by dusko
oVirt as a VMware replacement? (self.sysadmin)
It took a long time for us to get oVirt working, and we're currently still just testing it. That said, with EL7, it seems usable. I've generally heard that proxmox is one of the easiest to get going, but we are all Red Hat (well Scientific Linux), and were quite wary of using a "black box" for something as important as VMs.

oVirt is backed by Red Hat, and does seem like it and ProxMox are the most like a VMware environment. The other common tool, OpenStack (which I think has the most momentum behind it), isn't really the same sort of thing IMHO, and very focused on private or public cloud. If you're not looking to enable external (to IT) people to spin up and down VMs on a whim, it's not a great fit.

How familiar with Red Hat Enterprise Linux are you? I'm probably intermediate, and it required our dedicated Linux Admin to get Ovirt working at all. However, now that it's working, the WebGui is pretty point and click, but still non-intuitive. There's going to be a lot of manual reading here to figure out what settings have to be set, what the different options even mean, far less why you'd want them one way or another. It is possible to set up a VM by sort of feeling your way through however.

One other point - all of the tools seem to eventually get down to libvirt and KVM (except maybe Xen), so it wouldn't hurt to get a little familiar with those if you're admining it.

I used Ovirt for several years up to version 3.5.

1. It works pretty well. I never had any major problems with it. I did run into a few annoying bugs.

2. You really need to engineer your infrastructure for GlusterFS to make it really shine. It will support shared storage, but most everything I felt was keyed to use Gluster.

3. There are SDKs for it, but when I was using it, the SDKs were not well documented.

4. The Performance was good. I ran about 50 VMs on two servers with another server that acted as a Fibre Channel array.

5. I hated that you had to have an NFS file share to store things like ISO images.

6. Ovirt Node didn't work at all for me. I finally just installed a vanilla Fedora box and then installed Ovirt on there and it worked. Hopefully it's better now.

Do you even need to "spec to the max" ? I get maxing servers with RAM but noticed most workloads don't use nearly as much CPU to RAM ratio. I noticed a lot of admins I have worked with with seem to throw hardware at a problem instead of actually looking at the proper sizing. We were able to increase our consolidation ratios by 40% by just using better capacity planning practices. For example, larger clusters, DRS, etc..
kvm  virtualization  commandline  cli 
november 2017 by dusko
Using ed, the Unix line editor
A line editor is a text editor in which each editing command applies to one or more complete lines of text. Line editors predate screen based editors like vi, and originated in an era where a computer operator interacted with a teleprinter (a printer with a keyboard), with no video display, and no ability to move a cursor within a document.

This explains why ed focus on lines instead of screens. This also explains why ed is not so intuitive and not natural to someone coming from the world of screen based editors. To add insult to injury, ed is from a time where memory was very very precious, so using abbreviated commands and very succinct error messages made a lot of sense, but contributed to the overall confusion.
ed  editor  unix  cli  commandline 
november 2017 by dusko
Mutt notes - Allen Rueter's notes
The From_ (From space) seperator, is a little more picky than you might expect, it has to be in the following format:

From user@server.com Dow Mon Da HH:MM:SS Year tzone

learned this in trying to convert files from webmail to mbox format so they could be bounced to the new server.
mutt  cli  commandline 
october 2017 by dusko
Tips on configuring mutt or pine for use with Exchange
In your .muttrc file you will need to add:

set spoolfile=imaps://LoginId@mail.server.com/INBOX

or use mutt -f imaps://....
for reading meeting request veiwing look at this (https://eitknows.seas.wustl.edu/~allen/meeting.pl)
mutt  cli  commandline 
october 2017 by dusko
Miscellaneous Answers
* wmic errors
* strace httpd
* copy cd/dvd to iso to use on machine with out cd/dvd drive
umout if it is mounted
dd if=/dev/dvd of=somedvd.iso
scp somedvd.iso somehost:
mkdir /mnt/iso
somehost# mount -o loop somedvd.iso /mnt/iso

* make a CentOS boot usb-stick for netinstall
1) lftp or wget to your favorite iso site and get .../centos/5.5/os/x86_64/images/diskboot.img
2) dd if=diskboot.img of=/dev/sdc
3) take the usb-stick and boot it, you will need the above host and path to do the reset of the install it when ask for host and path, give it everything upto but exclude images/diskboot.img

* apache on linux, mod_qos error mutex nospace left on device
try: ipcs -s | grep root | awk ' { print $2 } ' | xargs -n 1 ipcrm -s

* Build OpenCV on CentOS

* So the machine only crashes under load?
MEMTEST86+ runs for over a whole weekend, no problems.
breakin from advanced clustering (http://www.advancedclustering.com/software/breakin.html) runs for a whole weekend without problems.
Try matlab or octave, s=sqrt(ram-in-bytes/16) ; tic;m=rand(s,s); mm=m*m; toc
It will use all of memory and gets every cpu/core running!

* building 64bit php5 with mysql, on centos 5

./configure --prefix=/usr/local/php52 --with-pdo-mysql --with-mysql
checking for mysql_errno in -lmysqlclient... no
configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.

adding with-zlib doesn't help, logs show it trying to use 32 bit version, so:
./configure --prefix=/usr/local/php52 --with-pdo-mysql --with-mysql --with-libdir=/usr/lib64
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!

strange error given the correct incantation is:
./configure --prefix=/usr/local/php52 --with-pdo-mysql --with-mysql --libdir=/usr/lib64 --with-libdir=lib64

* #ffff##: in .Xauthority is not good
the simple thing is to just remove the .Xauthority file.
cli  commandline  shell  linux 
october 2017 by dusko
Five Ways to Keep Remote SSH Sessions and Processes Running After Disconnection
process orphan daemon screen tmux nohup fg disown setsid ssh openssh
shell  ssh  cli  commandline 
october 2017 by dusko
Diff Find & Md5sum ( The difference in 2 Directories )
How to use diff ( we agreed we would forget about cmp ) in combination with the "md5sum" and "find" command.

How to make a list of checksums of all files in a directory and those below. Again we make a "test" directory and placed in it some files to create the example.
cli  commandline  shell 
october 2017 by dusko
Example xfreerdp usage with clipboard plugin - Unix & Linux Stack Exchange
Didn't need the below; now just using this:

xfreerdp -grab-keyboard /audio-mode:1 /size:2540x1045 /u:theskett@rocketsoftware.com /v: +clipboard


$ cd /usr/src
$ git clone git://github.com/FreeRDP/FreeRDP.git
$ cd FreeRDP

$ sudo aptitude install libcunit1-dev libdirectfb-dev xmlto doxygen \
libxtst-dev libavutil-dev libavcodec-dev build-essential git-core \
cmake libssl-dev libx11-dev libxext-dev libxinerama-dev \
libxcursor-dev libxdamage-dev libxv-dev libxkbfile-dev \
libasound2-dev libcups2-dev libxml2 libxml2-dev \
libxrandr-dev libgstreamer0.10-dev \
libgstreamer-plugins-base0.10-dev libxi-dev \

$ sudo cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON .
$ sudo make
$ sudo apt-get install checkinstall
$ sudo checkinstall make install
$ sudo which xfreerdp
$ xfreerdp --version
cli  commandline  shell 
october 2017 by dusko
« earlier      
per page:    204080120160

related tags

android  ansi  applemacosx  ascii  automation  awk  backup  bash  blog  bsd  bsh  c  c.h.i.p.  centos  cheatsheet  cli  coding  commandline  config  console  cron  csh  csv  data  dataanalysis  database  diagram  documentation  dotfiles  dump  ed  editor  email  encryption  ex  finance  fonts  freebsd  games  graph  grep  gtd  howto  http  images  irc  ksh  kvm  latex  learning  lifehacks  lifemanagement  linux  log  lvm  Mac  mail  mailserver  mailx  mariadb  media  mh  mirroring  mta  mutt  mysql  netcat  networking  nmh  notebook  notmuch  openbsd  opensource  owncloud  perl  plaintext  pomodoro  presentation  productivity  programming  projectmanagement  python  rhel  rs232serialport  rsnapshot  rsync  screen  script  security  sed  sendmail  server  sh  shell  smtp  snapshot  socumentation  software  ssh  ssl  staticsitegenerator  sync  sysadmin  tar  tcsh  terminal  tex  texteditor  timemanagement  tmux  tool  tools  TSV  tty  tutorial  unicode  unix  utf8  vi  vim  virtualization  visualization  VT100  web  webdevelopment  windows  wordpress  writing  x11  xorg  zfs  zimbra  zsh 

Copy this bookmark: