cmd.exe

How to Check Disk Free Space Command Prompt in Windows

Posted on
Whenever you’d like to check disk free space by command prompt in Windows, you can use examples as below: Print datetime C:\Users\edchen>echo Check Time: %date% %time% Check Time: Fri 03/30/2018 18:47:10.73 Check Disk Free Space Command Prompt C:\Users\edchen>fsutil volume diskfree c: Total # of free bytes : 205131612160 Total # of bytes : 257139486720 Total […]
Shell Script

How to Auto Start Oracle Database on Linux

Posted on
For Solaris OS, you should check this post: How to Auto Start Oracle Database on Solaris. By default, Oracle software installation does not deploy automatic startup and shutdown init scripts on the platform, you have to create them by yourself. Here I introduce my scripts for you to use or modify with. oratab in Linux […]
bash

How to Increase Bash History Size

Posted on
Some valuable or complex commands may not be able to keep in your mind constantly when you need them. In this moment, you can leverage the command history to recall them. But as time goes by, you could lose them due to the size limitation of command history. The history always keep the most recent […]
ksh

How to Set Default Editor to Vi in KSH

Posted on
You might find out your shell does not respond to your esc + k which can reuse the historical commands in KSH just like ↑ in bash. This is because the default EDITOR in your shell has not been set.There’re several ways to solve this:For session-scope only:$ set -o viFor single user:$ vi ~/.profile…EDITOR=vi; export […]
Shell Script

How to Take Parallel Jobs to Background in One Line

Posted on
Suppose you’re a SA. In the beginning of the year 2016, you have to execute multiple system analysis reports parallelly for every month last year. In the first place, you execute the following 1 + 12 commands like the followings.     1  cd ~/reporting     2  nohup ./system_analysis_monthly.sh ‘201501’ &     3  nohup ./system_analysis_monthly.sh ‘201502’ &  […]
Linux

How to Combine Multiple Files Into One on Linux

Posted on
In this post, I will introduce several ways to Combine files into one file. Suppose we have 4 files as followings:[root@localhost ~]$ cat 1.txt1. Database.1. Database.[root@localhost ~]$ cat 2.txt2. Web.2. Web.[root@localhost ~]$ cat 3.txt3. IT Architecture.3. IT Architecture.[root@localhost ~]$ cat 4.txt4. Project.4. Project.Vertical format: We can merge them by concatenating vertically.[root@localhost ~]$ cat 1.txt 2.txt […]
Linux

How to Remove First Few Characters on All Lines

Posted on
If you’d like to remove the first few characters with fixed width on all lines, you can try the following methods. For example, we have a file as this:[root@localhost ~]$ cat temp.txt123). Database Administration.124). Web Development.125). IT Architecture Design.126). Project Management.We’d like to remove the numbering part which is at position 1 to 6. Let’s […]