retext – Editor for restructured text

2015-05-15 1 min read Fedora Learning

restructured text is a simple text editor for markdown/restructured text which can show preview as well. So, here is some details on same :

Name        : retext
Arch        : noarch
Epoch       : 0
Version     : 5.0.1
Release     : 7.fc22
Size        : 412 k
Repo        : @System
Summary     : Text editor for Markdown and reStructuredText
URL         : http://sourceforge.net/p/retext/home/ReText
License     : GPLv3+
Description : ReText is a simple but powerful text editor for Markdown and reStructuredText.

Continue reading

ionice – renice you IO activity for the process.

2015-04-13 1 min read Learning

ionice is utility provided by the package util-linux. Description of util-linux:

Description : The util-linux package contains a large variety of low-level system
utilities that are necessary for a Linux system to function. Among
others, Util-linux contains the fdisk configuration tool and the login
program.

 

With the help of this utility, you can set the scheduler priority for your IO scheduling upto RealTime, but be careful that can make other process sluggish. Example use:

Continue reading

script to get hard disk health in fedora/ubuntu

2014-12-01 2 min read Fedora Learning Linux

First, put this in a script.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash

#Change as appropriate
HDD=sda

export sub="SmartCtl data for HDD"
echo 'To: <Your Email>
Sub: [Cron] $sub
MIME-Version: 1.0
Content-Type: text/html
Content-Disposition: inline

<html><pre>'


echo '<style>

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}
</style>
'

echo '<h2>Errors on HDD:</h2>'
echo '<hr>'
sudo smartctl -l error  /dev/$HDD
echo '<h2>Health of HDD:</h2>'
echo '<hr>'
sudo smartctl -H  /dev/$HDD

echo '<h2>Detailed info</h2>'
echo '<hr>'
sudo smartctl -a -d ata /dev/$HDD

echo '<h2>Journalctl output for smartd</h2>'
echo '<hr>'

if [[ -f /etc/fedora-release ]]
then
journalctl -x --show-cursor -u smartd --since=yesterday
else
#This is for Ubuntu.. still using dmesg

dmesg -T -l err,crit,alert,emerg

fi


echo '<h2>All Details</h2>'
echo '<hr>'

sudo smartctl --xall /dev/$HDD


echo "Thanks for using Amit Agarwal's script"
echo '</pre></html>'

and then put this in cron:

Continue reading

ncurses based eFTE editor – programmers lightweight editor

2014-11-17 1 min read Fedora Learning

nefte is a lightweight programmers editor. Here is descriptioin:

 

Description : eFTE is an advanced programmers editor with goals of being lightweight, yet
            : totally configurable. Support for user defined programming languages, menu
            : systems and key bindings are provided with many common defaults already
            : defined. eFTE is still a new project, however, we extend from the FTE editor
            : which was first released in 1995, so eFTE is tried and true with many features
            : for the programmer/text editor.
            : 
            : This package contains nefte, the ncurses version of the editor.

And to install:

Continue reading

Multiple entry in .ssh/config file

2014-10-24 1 min read Learning

Here is a link to one post on ssh config file.

However, if you want entries for lot of servers with their IPs or names, then it could be cumbersome to add all the entries in the .ssh/config file. So, here is a shortcut notation:

Host 1 2 3 4 5 6
Hostname 192.168.1.%h
    User 
    
    Ciphers arcfour

where '%h' denotes the IP that you use in the ssh command.

The following escape character substitutions will be performed:
             ‘%d’ (local user's home directory), ‘%h’ (remote host name), ‘%l’ (local host name),
              ‘%n’ (host name as provided on the command line), ‘%p’ (remote port),
              ‘%r’ (remote user name) or ‘%u’ (local user name).

Older posts Newer posts