≡ Menu

unix command

Explain Linux / UNIX dot-files

Q. Can you tell me more about dot-files that shell and many UNIX command reads?
[click to continue…]

How to: Run a shell script with nohup command

Q. I'd like to run a command or shell script immune to hangups, with output to a non-tty or file. How do I use nohup command to run script called ~/utils/backup upload?

A. nohup is a Unix command that is used to run another command while suppressing the action of the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. It is most often used to run commands in background as daemons. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.

Run a script with nohup command

Type the command as follows to run a script called ~/utils/backup with 'upload' as argument to script:
$ nohup ~/utils/backup "upload" &

UNIX Shell Scripting Tutorial

What is UNIX shell scripting? Can you provide UNIX shell scripting tutorial?
[click to continue…]

Unpacking or uncompressing gz files under Linux and UNIX systems

Q. How do I open or uncompress .gz extension file under Linux or UNIX computer?

A. The .gz file extension are created using Gzip program which reduces the size of the named files using Lempel-Ziv coding (LZ77). gunzip / gzip is software application used for file compression. gzip is short for GNU zip; the program is a free software replacement for the compress program used in early Unix systems.

Each file is replaced by one with the extension .gz, while keeping the same ownership modes, access and modification times.

To expand i.e. to Unpacking or uncompressing gz files you need to use gunzip program Or gzip -d or zcat program:

Using gunzip command:
$ gunzip file.gz
$ ls file

Using gzip -d command:
$ gzip -d file.gz
$ ls file

If file extension is tar.gz, type the command:
$ tar -zxvf file.tar.gz
Please note that gunzip can currently decompress files created by gzip, zip, compress, compress -H or pack programs.

See also:

Commonly used UNIX / Linux commands by new user

Q. . I'm a new Linux user. Can you tell me commonly used Linux / UNIX command?
[click to continue…]

Linux / UNIX: Delete a file

How do I delete a file under Linux / UNIX / BSD / AIX / HP-UX operating system using command line options?
[click to continue…]