The command used to list directory content in Linux is ls. With the -R option, ls will traverse the directory recursively, showing the content of the particular directory and all its subdirectories. Relative directory path is displayed before the directory content is actually listed.
The following is an example of the command in use;
$ ls -R testdir/ testdir/: subdir1 subdir2 testdir/subdir1: subsubdir1 subsubdir2 testdir/subdir1/subsubdir1: file1 testdir/subdir1/subsubdir2: file2 testdir/subdir2: subsubdir1 subsubdir2 testdir/subdir2/subsubdir1: file3 testdir/subdir2/subsubdir2: file4
If you want to create a new MySQL table with the same structure as an existing table, you can use the following MySQL statement;
CREATE TABLE new_table LIKE source_table;
This will just create a new, empty table and does not copy the following;
To also copy the data from the source table, use the following INSERT
statement after the table is created;
INSERT INTO new_table SELECT * FROM source_table;
You can easily create an SSH
key pair by using ssh-keygen
as in the following example.
$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa. Your public key has been saved in /home/user/.ssh/id_rsa.pub. The key fingerprint is: 1a:6c:a4:94:df:e0:19:ec:85:b0:3f:27:e4:a1:de:65 user@host The key's randomart image is: +--[ RSA 2048]----+ | | | . | | o E | | O o | | c @ S | | o A @ | | . E . | | . = | | . | +-----------------+
There are a few things that you might want need to take note;
RSA
key pair will be generated by default. You can use different key type by using -t
option and specify any of the supported key types
dsa ecdsa ed25519 rsa rsa1
~/.ssh/id_rsa
while the public key will be stored in ~/.ssh/id_rsa.pub
. You can specify other location when prompted during the key generation process if you already have a key pair at the default locationSSH
login
GRUB is a small program used to manage booting into operating systems, loaded by the MBR. It allows you to select operating systems to boot and specify boot options …
Read More
7-Zip
is a file archiver program that claims to compress files into smaller size compared to other programs such as WinRAR
and WinZip
. The program can pack and unpack various formats such as ZIP
, GZIP
, BZIP2
, TAR
, and of course, its own format, 7z
. The 7z
format itself is actually a container that supports few compression method such as LZMA
, Deflate
and BZIP2
, with LZMA
as default.