Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 LINUX/UNIX


  Recover deleted file in Linux EXT3 file system

Environment : CentOS 5.3 x86_64, /dev/sdb1 is the data segment /data0. EXT3 file system.Problem : /data0/tcsql/cankao/phpcws-1.5.0/httpcws.cpp is deleted mistakenly and httpcws.cpp is not backed up. It will take much time to rewrite this program again. So we must recover it back.debugfs is feasible in EXT2 file system, but in EXT3 file system, it's not very useful. There is one open source software called ext3grep which can help us recover deleted file in EXT3 file system. The recovery steps are:1. Install ext3grep.wget http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gztar zxvf ext3gr...

7,907 0       LINUX EXT3 FILE RECOVERY


  Big file transfer in Linux

It's very common that we need to transfer files between two different hosts such as backups. It is also an very simple task, we can use scp or rsync to complete the task well. But what if the file is very big, it may take some time to transfer it. How can we transfer a big file with high speed? Here we propose one solution.Copy fileIf we copy one uncompressed file, then we should follow below steps:Compress dataSend it to another hostUncompress the dataVerify the data integrityThis will be very efficient and it also saves bandwidth.With ZIP+SCPWe can combine ZIP and SCP to achieve this.gzip -c...

7,487 0       LINUX SCP ZIP


  Set up Superset on ubuntu 16.04 LTS

Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application. Compared with business-focused BI tool like Tableau, superset is more technology-navy. It supports more types of visualization and able to work in distributed manner to boost the query performance. Most importantly, it is free of charge!An example dashboard:Let’s go and set it up.Create a virtualenvAssume Anaconda is installed for python management.# create a virtualenv with python 3.6conda create -n superset python=3.6Install in virtualenventer the virtual environment and follow the of...

7,045 1       SUPERSET UBUNTU TUTORIAL


  10 tools to make your shell script more powerful

Many people mistakenly think that shell scripts can only be run in command line. In fact shell can also call some GUI components such as menus,alert dialogs, progress bar etc. You can control the final output, cursor position and various output effects. Here we introduce some tools which can help you create powerful, interactive and user friendly Unix/Linux shell scripts.1. notify-sendThis command can let you inform the process to send a desktop notification to users. This can be used to send prompt to users or display some information to users. You can download it :$ sudo apt-get install libn...

7,016 0       GUI SHELL ZENITY


  Convert time to Unix time

Unix time is defined as the number of seconds that have elapsed since midnight Coordinated Universal Time (UTC), 1 January 1970,not counting leap seconds. It is used widely in Unix-like and many other operating systems and file formats. It is neither a linear representation of time nor a true representation of UTC. Unix time may be checked on some Unix systems by typing date +%s on the command line.Sometimes it's a bit difficult to compare times stored in different applications or systems with different formats. For example, if we want to compare a DATE in Oracle with a date string in Unix, we...

6,560 0       UNIX TIME ORACLE DATE CONVERSION TIMESTAMP


  Using vi key bindings in bash and zsh

Takeaway: If you prefer to use vi or vim for command-line editing, you can configure shells to use vi key bindings instead of emacs-style key bindings. Here’s how. By default, most shells use emacs-style key bindings for command-line editing and modification. For users of vi or vim, however, you can instead configure shells to use vi key bindings instead. This is done by editing ~/.bashrc in the case of bash, or ~/.zshrc in zsh and adding:set -o viin bash, and the following for zsh:bindkey -vOnce you have saved either ~/.bashrc or ~/.zs...

6,512 0       LINUX BASH VI ZSH KEY BINDING


  Common usage of ls command in Linux

In Linux, ls might be one of the most frequently used commands. It is used to list files in a specific directory. In most cases, we may just use ls -l to list the files under a directory. But have you explored other usages of this command. In this post, we will summarise some other common usages of ls commandAssuming we have below directory structure in our system, let's see them using tree command.List details of the filesIf we want to list the details of the files in /home/alvin/test_dir, we can funls -lR /home/alvin/test_dir/Output:[alvin@VM_0_16_centos test_dir]$ ls -lR...

6,209 0       LS SHELL LINUX


  Build RPM package on Linux

1. Check the OS version and core version#uname -a#more /etc/redhat-release2. Create relative directories/usr/src/redhat/SOURCES    //Store source codes, patches, icons etc/usr/src/redhat/SPECS        //Store specs about the process of building RPM packages/usr/src/redhat/BUILD     //File after uncompressed are stored here/usr/src/redhat/RPMS     //Store the binary files built with rpmbuild/usr/src/redhat/SRPMS   //Store source code package built with rpmbuild #mkdir -p /usr/src/redhat/#cd /usr/src/redhat/...

5,994 0       LINUX BUILD RPM