Top "Unix" questions

This tag is EXCLUSIVELY for PROGRAMMING questions that are directly related to Unix; general software issues should be directed to the Unix & Linux Stack Exchange site or to Super User.

Unix shell script find out which directory the script file resides?

Basically I need to run the script with paths related to the shell script file location, how can I change …

shell unix
OS X: equivalent of Linux's wget

How can I do an HTTP GET from a Un*x shell script on a stock OS X system? (installing …

macos shell unix http-get
Difference between sh and bash

When writing shell programs, we often use /bin/sh and /bin/bash. I usually use bash, but I don't know …

bash shell unix sh
Given two directory trees, how can I find out which files differ by content?

If I want find the differences between two directory trees, I usually just execute: diff -r dir1/ dir2/ This outputs …

linux bash shell unix diff
Extract file basename without path and extension in bash

Given file names like these: /the/path/foo.txt bar.txt I hope to get: foo bar Why this doesn't …

linux bash unix filenames
How to determine the current shell I'm working on

How can I determine the current shell I am working on? Would the output of the ps command alone be …

bash unix shell csh tcsh
How can I extract a predetermined range of lines from a text file on Unix?

I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of …

unix command-line sed text-processing
How to Free Inode Usage?

I have a disk drive where the inode usage is 100% (using df -i command). However after deleting files substantially, the …

linux unix memory-management inode
How to split a large text file into smaller files with equal number of lines?

I've got a large (by number of lines) plain text file that I'd like to split into smaller files, also …

bash file unix
how to find host name from IP with out login to the host

i need to find the host name of a UNIX host whose IP is known with out login to that …

unix command-line hostname