≡ Menu

KSH Shell

HowTo: Save The Output Of A Linux/Unix Command To A File

I am new Linux and Unix-like system user who recently switched from MS-Windows XP. How do I save the output of a Linux / Unix ls command to a file named “lists.txt” using command prompt or POSIX shell such as SH/KSH/BASH?
[click to continue…]

Sysadmin because even developers need heroes!!!

Unix/ Linux: Print Environment Variables Command

I am a new shell user. How do I print or list environment variables on Linux and Unix-like operating system using shell prompt? In Linix and Unix, how can I print values of all my environment variables?
[click to continue…]

Linux / Unix: which Command Examples To Find Out A Program File

which command

I am a new Linux and Unix-like system user. How do I find out gcc compiler path on Linux? How can I locate a program file in path on Linux or Unix-like systems?
[click to continue…]

Linux / Unix: disown Command Examples

disown command

I am a new Linux and Unix shell user. How do I Remove or delete jobs from current bash / ksh or POSIX based shell?
[click to continue…]

Linux / Unix: fg Command Examples

fg command

I am new Linux/Unix shell user. How do I bring a background process to the foreground on Linux or Unix-like system? How do I run jobs in the foreground on Linux/Unix bash/ksh or POSIX based shell?
[click to continue…]

less Command Display Line Numbers

I‘m a new Linux user. How can I display line numbers using the less command on Linux or Unix-like system using bash/ksh shell?
[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: bg Command Examples

bg command

I am new Linux and Unix system bash/ksh user. How do I run jobs or scripts in the background on Linux/Unix-like systems? How can I run jobs in the background on bash or ksh or sh shell?
[click to continue…]

Linux / Unix Shell Script Get Current Year

How do I get the current year in shell script and store in a shell variable called $myyear?
[click to continue…]