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

SEARCH KEYWORD -- linux



  Create temp file in Bash using mktemp and trap

When working on Linux Bash, sometimes there is need to create temporary file. A common way of creating temp file on Linux is creating some file in /tmp directory. However there is security risk when creating temp file in /tmp directory. This post will show how to securely create temp file in Linux Bash. When creating file in /tmp directory, there are some security risks. This directory can be accessed by any user on the system, any user can write data into this directory as well. The files creat...

   LINUX,MKTEMP,TRAP,TEMP FILE     2019-12-30 23:28:23

  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 a...

   Linux,EXT3,File recovery     2013-08-16 07:06:45

  Unix directory hierarchy history

As a beginner user of Unix or Linux, people would frequently get confused about the use of different directories of the system.  For example, there is a /bin directory under root(/), it is used to store binary files. However, there are /usr/bin and /usr/local/bin under /usr which are used for storing binary files as well. Some systems even have /opt/bin. What are the differences among them? Though there are articles explaining different directories in *nix such as Filesystem Hierarchy Stan...

   UNIX,LINUX,FILESSYTEM,DIRECTORY HIERARCHY,HISTORY     2016-10-21 23:47:17

  Handle NXDomain error when resolving IP address in Ruby DNS resolver

In another post, we covered how to resolve SystemStackError when resolving IP address in Ruby. In this post, we would cover another common issue where a NXDomain error is returned when resolving an IP address. The NXDomain error means that the queried domain name does not exist in the DNS. In Ruby, DNS resolver library will use /etc/resolv.conf by default get the name servers to resolve the domain name. There are multiple DNS name servers can be specified in /etc/resolv.conf with below format. ...

   RUBY,RUBY ON RAILS,NETWORK,DNS,NXDOMAIN     2017-07-16 01:39:23

  Convert ext3 to ext4 file system on CentOS

ext3 is a journaled file system that is commonly used by the Linux kernel. It is the default file system for many popular Linux distributions, including Debian. Stephen Tweedie. On June 28, 2006, Theodore Ts'o, the principal developer of ext3, announced an enhanced version, called ext4. Today, we will show how to convert ext3 to ext4 format on CentOS. System environment: Release version : CentOS release 5.4(Final) Kernel:  Linux localhost.lo...

   CentOS, ext3 to ext4     2012-11-21 11:40:45

  Microsoft forms a new subsidiary focused on open source called Microsoft Open Technologies

Microsoft once again changes its attitude and intends to set up an open technology subsidiaries in order to promote the formulation of open-source projects and standards.The new company name is Microsoft Open Technologies and Jean Paoli, Microsoft executives will be the president of the new company. The company will also form interoperability strategy team in the future. The newly established company will have about 50-75 employees.Over the years, Microsoft has been considered to be the rival of...

   Microsft,Open source,Microsoft Open Technologies     2012-04-13 06:10:45

  Those famous Emacs users

I don't think using Emacs can improve one's programming skills, I don't think some famous people used Emacs before can provide something, either. But these famous people encouraged me to learn Emacs when I wanted to give it up. Here I created a list of famous Emacs users. Most of people in this list are not famous because they developed or used Emacs, but they are famous and also use Emacs. Joe Armstrong -- Erlang's author In The Setup, Joe mentioned that "I write books using XML markup in emacs...

   Emacs,History     2013-07-28 21:36:09

  Build RPM package on Linux

1. Check the OS version and core version #uname -a #more /etc/redhat-release 2. 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&nbs...

   RPM,Linux,Build     2013-03-22 12:44:29

  HeartBleed: Inside the heart, what happens to a normal WEB user?

To be brief, our email, IM, facebook etc. are at the risk, so try to minimize the access in these few days. Especially we should try to avoid log into our internet-banking, because we may expose our user id and password. Also later when the service providers fix the bug, we would better to change a new password for all the web accounts that are important to us. Here comes the technical explanation. You might notice before that a lot of websites use URL starting with "https". For example, https:/...

   HeartBleed,Analysis     2014-04-09 22:41:43

  Problem and Solution for Installing wxPython on Ubuntu 20.04

When we try to install wxPython lib on Ubuntu system to do software GUI development, most of time we may meet some installation and lib dependency problems. For the latest Ubuntu version, the problems still happen. Below are some common problems which happened frequently and their solution: --------------------------------------------------------------------------------------------------------------- Problem [1]: Install wxPython on Ubuntu 20.04 fail because of dependency package Gtk is not in...

   PYTHON,WXPYTHON,UBUNTU 20.04     2020-09-09 05:32:35