≡ Menu

modes

Linux / Unix: scp Copy All Hidden Dot Files

I'm using scp command to copy files from one server to another server. The problem is that I'm unable to copy all hidden files (such as .bash_history). How do I copy hidden files using the scp command under Unix like operating systems?
[click to continue…]

HowTo: Save File in Vi / Vim Text Editor

I'm new to Linux or UNIX like operating system. I just wanted to create a file called demo.txt and save & close it using vi text editor. How do I save a file using vi?
[click to continue…]

I'm trying to login using ssh keys but server is only allows to login me using a password. The following message is logged into server /var/log/secure file:

Feb 25 06:36:50 ns5 sshd[26681]: Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys2

How do I fix this problem?
[click to continue…]

How do I find out all world writable directories have sticky bits set under CentOS Linux server?
[click to continue…]

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: