ranger – try terminal file manager

2018-06-11 1 min read Fedora Learning

ranger is a terminal file manager, just install and run and have some fun.

Tip: You might want to try it on uxrvt terminal and in Photos folder once.

 

Name : ranger
Version : 1.7.2
Release : 8.fc28
Arch : noarch
Size : 1.2 M
Source : ranger-1.7.2-8.fc28.src.rpm
Repo : @System
From repo : fedora
Summary : A flexible console file manager
URL : http://savannah.nongnu.org/projects/ranger/
License : GPLv3+
Description : Ranger is a free console file manager that gives you greater flexibility and a
good overview of your files without having to leave your *nix console. It
visualizes the directory tree in two dimensions: the directory hierarchy on
one, lists of files on the other, with a preview to the right so you know where
you’ll be going.

Display IP address in console login screen

2018-04-30 1 min read Learning

Here is one liner that will add the current IP address in the console login screen (if you are not running X as is case for servers):

(ip -o -4 a| awk '$2 !="lo" {print "\nIP Address ::"$4}' |tr '\n' ',';echo)>>/etc/issue

Just execute the above command as root. It will add the required code in “/etc/issue” to display the IP address. BTW, you can also use “\4” or “\6” instead of that command to get the IP but that will not work with some old versions of Linux.

Continue reading

Port php mysql scripts to php 7.0 from 5.x version

2018-04-23 2 min read Learning

Recently I got a script or series of scripts that were written for PHP 5.6x and hence used mysql_connect which as you know by now does not work with PHP 7.0. Since there were number of scripts, I thought it would be waste of time to change them manually and wrote a script to fix them. If you have similar situation then probably this few lines could help you.

Since my scripts did not use all the functions so I did not put the sed commands for all of them but you get the idea 🙂

Continue reading

Send history of current host to some other host over ssh

2018-02-26 1 min read Fedora Learning

Sometimes I want to save the history of current host on another host. This is to ensure that I can use copy/paste on other host to run the commands. To this, I found a simple solution –

history| ssh <user>@<host> 'cat - > /tmp/history'

And on the new host, you can find the history in file “/tmp/history”, cool :). Now I can quick edit this file to create this as shell script as well if required. How cool is that.

Continue reading
Older posts Newer posts