From the category archives:

BASH Shell

Q. I’m getting an error as follows while trying to run a shell script over remote ssh session:

./myscript.sh
/bin/bash: bad interpreter: Text file busy

How do I fix this error message and run the script?

{ 0 comments }

Q. How do I find out which table is consuming resources under MySQL Database server from UNIX shell prompt?

{ 3 comments }

Linux Find Large Files

by Vivek Gite

Q. How do I find out all large files in a directory?

{ 9 comments }

Q. How do I perform topological sort or topological ordering without writing code in C or other programming language? How do I performs a topological sort on the given FILE using a shell script?

{ 0 comments }

Q. I’ve couple of large tarballs such as www.tar and images.tar. Is it possible to extract a single file or a list of files from a large tarball such as images.tar instead of extracting the entire tarball? How do I extract specific files under Linux / UNIX operating systems?

{ 4 comments }

Q. Physical Address Extension (PAE) refers to a feature of x86 and x86-64 processors that allows more than 4G bytes of physical memory to be used in 32-bit systems. The x86 architecture presently uses only 36 bits out of 52 bits possible. On x86-64 processors, PAE is obligatory in native long mode; currently 40 bits are used out of 52 bits possible. How do I find out if my Linux kernel supports 36-bit or more physical addressing?

{ 3 comments }

Question: I’m using Exim mail server under CentOS Linux. How do I remove all messages from the Exim mail queue using a shell prompt?

{ 5 comments }

Question: I’ve downloaded configuration file in a PDF format. I do not have GUI installed on remote Linux / UNIX server. How do I convert a PDF (Portable Document Format) file to a text format using command line so that I can view file over remote ssh session?

{ 3 comments }

Question: I can use less or more pagers to view a file. How do I start an editor (such as vi or other text editor) to edit the current file without leaving the less or more pager?

{ 1 comment }

Bash For Loop Examples

by Vivek Gite

Question: How do I use bash for loop statement to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using for statement? How do I use three-parameter for loop control expression?

{ 6 comments }