≡ Menu

NetBSD

Where Is The Xorg.conf File Located under Unix / Linux / BSD?

I want to find and edit my xorg.conf file for tweaking and configure it for new settings. The problem is that I'm unable to find the file. According to my research, xorg.conf should in /etc/X11 or /usr/X11R6/lib/X11/ directory. I found directories but not the file in directories. How do I find the xorg.conf under Unix or Linux like operating systems?
[click to continue…]

UNIX: Recursive Delete Directory / Files

How do I delete (remove) a directory called $HOME/foo and its content including all files and sub-directories under Unix like operating systems? What is the best way to completely delete /tmp/foo/ with all it's content?
[click to continue…]

Linux / Unix Shell Script: Get Current User Name

I am working on a shell script. I need to find out the current user name. How do I find out the current user name under Bash or Ksh shell running on Linux or Unix like operating systems?
[click to continue…]

Linux / Unix: Cat Command Examples

cat command

I am a new Linux and Unix system user. How do I use cat command on Linux or Unix-like operating systems? Can you provide basic examples and syntax usage for cat command?
[click to continue…]

Find Out PHP Version installed On Unix / Linux Server

How do I find out php version under Linux operating systems? How do I find out php version under Unix like systems? How to find out what version of PHP is installed on my server?
[click to continue…]

Linux / Unix: Sort Specific Field or Column

How do I sort output of find . -type f -iname "pattern*" -ls command by seventh column in Linux? Sample input:

7782638 15084 -rw-r--r-- 1 tom tom 15422474 Aug 1 2011 ./logserver42/2011/hsbcreports_201107.html
7782637 14504 -rw-r--r-- 1 tom tom 14830464 Jul 1 2011 ./logserver42/2011/hsbcreports_201106.html
7782643 14408 -rw-r--r-- 1 tom tom 14730488 Dec 1 2011 ./logserver42/2011/hsbcreports_201111.html
7782640 19656 -rw-r--r-- 1 tom tom 20101379 Oct 1 2011 ./logserver42/2011/hsbcreports_201109.html
7782634 17588 -rw-r--r-- 1 tom tom 17985190 Apr 1 2011 ./logserver42/2011/hsbcreports_201103.html
7782641 20796 -rw-r--r-- 1 tom tom 21263382 Nov 1 2011 ./logserver42/2011/hsbcreports_201110.html
7798789 13296 -rw-r--r-- 1 tom tom 13590695 Mar 1 2012 ./logserver42/2012/hsbcreports_201202.html
7798788 12220 -rw-r--r-- 1 tom tom 12495686 Feb 1 2012 ./logserver42/2012/hsbcreports_201201.html
5701709 1648 -rw-r--r-- 1 tom tom 1681600 Nov 1 11:14 ./logserver42/2012/hsbcreports_201210.html
7798802 8944 -rw-r--r-- 1 tom tom 9138603 Jun 1 10:13 ./logserver42/2012/hsbcreports_201205.html
5701710 648 -rw-r--r-- 1 tom tom 657811 Nov 10 11:13 ./logserver42/2012/hsbcreports_201211.html
7798805 7360 -rw-r--r-- 1 tom tom 7523891 Sep 1 10:11 ./logserver42/2012/hsbcreports_201208.html
7323999 776 -rw-r--r-- 1 tom tom 787924 Jun 12 2006 ./logserver42/2006/hsbcreports_200605.html
7324001 140 -rw-r--r-- 1 tom tom 139058 Aug 22 2006 ./logserver42/2006/hsbcreports_200607.html
7324000 44 -rw-r--r-- 1 tom tom 41447 Jun 12 2006 ./logserver42/2006/hsbcreports_200606.html
7324003 1972 -rw-r--r-- 1 tom tom 2014614 Oct 1 2006 ./logserver42/2006/hsbcreports_200609.html
7356496 3136 -rw-r--r-- 1 tom tom 3205737 Dec 1 2007 ./logserver42/2007/hsbcreports_200711.html

I need the following output:

7324000 44 -rw-r--r-- 1 tom tom 41447 Jun 12 2006 ./logserver42/2006/hsbcreports_200606.html
7324001 140 -rw-r--r-- 1 tom tom 139058 Aug 22 2006 ./logserver42/2006/hsbcreports_200607.html
5701710 648 -rw-r--r-- 1 tom tom 657811 Nov 10 11:13 ./logserver42/2012/hsbcreports_201211.html
7323999 776 -rw-r--r-- 1 tom tom 787924 Jun 12 2006 ./logserver42/2006/hsbcreports_200605.html
5701709 1648 -rw-r--r-- 1 tom tom 1681600 Nov 1 11:14 ./logserver42/2012/hsbcreports_201210.html
7324003 1972 -rw-r--r-- 1 tom tom 2014614 Oct 1 2006 ./logserver42/2006/hsbcreports_200609.html
7356496 3136 -rw-r--r-- 1 tom tom 3205737 Dec 1 2007 ./logserver42/2007/hsbcreports_200711.html
7798805 7360 -rw-r--r-- 1 tom tom 7523891 Sep 1 10:11 ./logserver42/2012/hsbcreports_201208.html
7798802 8944 -rw-r--r-- 1 tom tom 9138603 Jun 1 10:13 ./logserver42/2012/hsbcreports_201205.html
7798788 12220 -rw-r--r-- 1 tom tom 12495686 Feb 1 2012 ./logserver42/2012/hsbcreports_201201.html
7798789 13296 -rw-r--r-- 1 tom tom 13590695 Mar 1 2012 ./logserver42/2012/hsbcreports_201202.html
7782643 14408 -rw-r--r-- 1 tom tom 14730488 Dec 1 2011 ./logserver42/2011/hsbcreports_201111.html
7782637 14504 -rw-r--r-- 1 tom tom 14830464 Jul 1 2011 ./logserver42/2011/hsbcreports_201106.html
7782638 15084 -rw-r--r-- 1 tom tom 15422474 Aug 1 2011 ./logserver42/2011/hsbcreports_201107.html
7782634 17588 -rw-r--r-- 1 tom tom 17985190 Apr 1 2011 ./logserver42/2011/hsbcreports_201103.html
7782640 19656 -rw-r--r-- 1 tom tom 20101379 Oct 1 2011 ./logserver42/2011/hsbcreports_201109.html
7782641 20796 -rw-r--r-- 1 tom tom 21263382 Nov 1 2011 ./logserver42/2011/hsbcreports_201110.html

[click to continue…]

Use wget Command To Download Files From HTTPS Domains

How do I download a file using https://example.com/dl/foo.tar.gz using wget command line utility?
[click to continue…]

Unix / Linux: Remove Nonempty Directory Command

I am trying to remove a directory called /opt/source/httpd with the rm command. I am greeted with the following message:

rmdir: failed to remove `/opt/source/httpd': Directory not empty

How do I delete directory called /opt/source/httpd under Linux or Unix operating systems?
[click to continue…]

Find Out MySQL Version

How do I find out mysql version under Linux or Unix operating systems?
[click to continue…]

KVM virt-install: Install OpenBSD As Guest Operating System

OpenBSD is a UNIX like system based on Berkeley Software Distribution (BSD). It was forked form NetBSD and created by Theo de Raadt in 1995. OpenBSD is famous for quality code and documentation without compromising position on software licensing. OpenBSD is also well know for focus on security features such as Memory protection, cryptography, randomization and much more in default base installation.
[click to continue…]