Tuesday, 14 January 2020

9 Useful touch command examples in Linux

Touch command is used to create empty files and also changes the timestamps of existing files on Unix & Linux System. Changing timestamps here means updating the access and modification time of files and directories.

Touch Command, Linux Guides, Linux Learning, Linux Certification, LPI Study Materials

Let’s have a look on the syntax and options used in touch command,

Syntax: # touch {options} {file}

Options used in touch command,

Touch Command, Linux Guides, Linux Learning, Linux Certification, LPI Study Materials

In this article we will walk through 9 useful touch command examples in Linux,

Example: 1 Create an empty file using touch


To create an empty file using touch command on Linux systems, type touch followed by the file name, example is shown below,

[root@lpicentral ~]# touch devops.txt
[root@lpicentral ~]# ls -l devops.txt
-rw-r--r--. 1 root root 0 Mar 29 22:39 devops.txt
[root@lpicentral ~]#

Example: 2 Create empty files in bulk using touch


There can be some scenario where we have to create lots of empty files for some testing, this can be easily achieved using touch command,

[root@lpicentral ~]# touch sysadm-{1..20}.txt

In the above example we have created 20 empty files with name sysadm-1.txt to sysadm-20.txt, you can change the name and numbers based on your requirements.

Example: 3 Change / Update access time of a file and directory


Let’s assume we want to change access time of a file called “devops.txt“, to do this use ‘-a‘ option in touch command followed by file name, example is shown below,

[root@lpicentral ~]# touch -a devops.txt
[root@lpicentral ~]#

Now verify whether access time of a file has been updated or not using ‘stat’ command

[root@lpicentral ~]# stat devops.txt
  File: ‘devops.txt’
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fd00h/64768d    Inode: 67324178    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:admin_home_t:s0
Access: 2018-03-29 23:03:10.902000000 -0400
Modify: 2018-03-29 22:39:29.365000000 -0400
Change: 2018-03-29 23:03:10.902000000 -0400
 Birth: -
[root@lpicentral ~]#

Change access time of a directory,

Let’s assume we have a ‘nfsshare’ folder under /mnt, Let’s change the access time of this folder using the below command,

[root@lpicentral ~]# touch -m /mnt/nfsshare/
[root@lpicentral ~]#

[root@lpicentral ~]# stat /mnt/nfsshare/
  File: ‘/mnt/nfsshare/’
  Size: 6               Blocks: 0          IO Block: 4096   directory
Device: fd00h/64768d    Inode: 2258        Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:mnt_t:s0
Access: 2018-03-29 23:34:38.095000000 -0400
Modify: 2018-03-03 10:42:45.194000000 -0500
Change: 2018-03-29 23:34:38.095000000 -0400
 Birth: -
[root@lpicentral ~]#

Example: 4 Change Access time without creating new file


There can be some situations where we want to change access time of a file if it exists and avoid creating the file.  Using ‘-c‘ option in touch command, we can change access time of a file if it exists and will not a create a file, if it doesn’t exist.

[root@lpicentral ~]# touch -c sysadm-20.txt
[root@lpicentral ~]# touch -c winadm-20.txt
[root@lpicentral ~]# ls -l winadm-20.txt
ls: cannot access winadm-20.txt: No such file or directory
[root@lpicentral ~]#

Example: 5 Change Modification time of a file and directory


Using ‘-m‘ option in touch command, we can change the modification time of a file and directory,

Let’s change the modification time of a file called “devops.txt”,

[root@lpicentral ~]# touch -m devops.txt
[root@lpicentral ~]#

Now verify whether modification time has been changed or not using stat command,

[root@lpicentral ~]# stat devops.txt
  File: ‘devops.txt’
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fd00h/64768d    Inode: 67324178    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:admin_home_t:s0
Access: 2018-03-29 23:03:10.902000000 -0400
Modify: 2018-03-29 23:59:49.106000000 -0400
Change: 2018-03-29 23:59:49.106000000 -0400
 Birth: -
[root@lpicentral ~]#

Similarly, we can change modification time of a directory,

[root@lpicentral ~]# touch -m /mnt/nfsshare/
[root@lpicentral ~]#

Example:6 Changing access and modification time in one go


Use “-am” option in touch command to change the access and modification together or in one go, example is shown below,

[root@lpicentral ~]# touch -am devops.txt
[root@lpicentral ~]#

Cross verify the access and modification time using stat,

[root@lpicentral ~]# stat devops.txt
  File: ‘devops.txt’
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fd00h/64768d    Inode: 67324178    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:admin_home_t:s0
Access: 2018-03-30 00:06:20.145000000 -0400
Modify: 2018-03-30 00:06:20.145000000 -0400
Change: 2018-03-30 00:06:20.145000000 -0400
 Birth: -
[root@lpicentral ~]#

Example:7 Set the Access & modification time to a specific date and time


Whenever we do change access and modification time of a file & directory using touch command, then it set the current time as access & modification time of that file or directory,

Let’s assume we want to set specific date and time as access & modification time of a file, this is can be achieved using ‘-c’ & ‘-t’ option in touch command,

Date and Time can be specified in the format: {CCYY}MMDDhhmm.ss

Where:

◈ CC – First two digits of a year
◈ YY – Second two digits of a year
◈ MM –  Month of the Year (01-12)
◈ DD – Day of the Month (01-31)
◈ hh –  Hour of the day (00-23)
◈ mm – Minutes of the hour (00-59)

Let’s set the access & modification time of devops.txt file for future date and time( 2025 year, 10th Month, 19th day of month, 18th hours and 20th minute)

[root@lpicentral ~]# touch -c -t 202510191820 devops.txt

Use stat command to view the update access & modification time,

Set the Access and Modification time based on date string, Use ‘-d’ option in touch command and then specify the date string followed by the file name, example is shown below,

[root@lpicentral ~]# touch -c -d "2010-02-07 20:15:12.000000000 +0530" sysadm-29.txt
[root@lpicentral ~]#

Verify the status using stat command,

[root@lpicentral ~]# stat sysadm-20.txt
  File: ‘sysadm-20.txt’
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fd00h/64768d    Inode: 67324189    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:admin_home_t:s0
Access: 2010-02-07 20:15:12.000000000 +0530
Modify: 2010-02-07 20:15:12.000000000 +0530
Change: 2018-03-30 10:23:31.584000000 +0530
 Birth: -
[root@lpicentral ~]#

Note: In above commands, if we don’t specify ‘-c’ then touch command will create a new file in case it doesn’t exist on the system and will set the timestamps whatever is mentioned in the command.

Example: 8 Set the timestamps to a file using a reference file (-r)


In touch command we can use a reference file for setting the timestamps of file or directory. Let’s assume I want to set the same timestamps of file “sysadm-20.txt” on “devops.txt” file. This can be easily achieved using ‘-r’ option in touch.

Syntax: # touch -r {reference-file} actual-file

[root@lpicentral ~]# touch -r sysadm-20.txt devops.txt
[root@lpicentral ~]#


Example: 9 Change Access & Modification time on symbolic link file


By default, whenever we try to change timestamps of a symbolic link file using touch command then it will change the timestamps of original file only, In case you want to change timestamps of a symbolic link file then this can be achieved using ‘-h’ option in touch command,

Syntax: # touch -h {symbolic link file}

[root@lpicentral opt]# ls -l /root/linuxgeeks.txt
lrwxrwxrwx. 1 root root 15 Mar 30 10:56 /root/linuxgeeks.txt -> linuxadmins.txt
[root@lpicentral ~]# touch -t 203010191820 -h linuxgeeks.txt
[root@lpicentral ~]# ls -l linuxgeeks.txt
lrwxrwxrwx. 1 root root 15 Oct 19  2030 linuxgeeks.txt -> linuxadmins.txt
[root@lpicentral ~]#

Saturday, 11 January 2020

CVS command Examples - Unix / Linux

LPI Tutorials and Materials, LPI Guides, LPI Learning, LPI Certifications

CVS (concurrent Version Control system) is a version controlling system used to record the history of the files. Whenever a code is changed in software, there might be chance of bugs creeping into that. With CVS, you can easily get the old version of the code and see what part of the code exactly created the bug.

In CVS, we can save every version of the file. The CVS only stores the differences between the files. This saves a huge amount of disk space.

The general syntax of CVS command is

cvs [option] filename

CVS Command Examples:

1. Checking out file


You can check out a file from the CVS repository with the checkout (co) option. This is shown below:

cvs co oracle_storage.dat

2. Adding a file to the repository


Use the add option to add a new file to the cvs repository.

cvs add mysql.bat

This will not commit the file to the cvs. It just simply adds the file.

3. Committing the file.


Once you have added a file to the CVS repository, you have to commit the file. Use the commit option with cvs command for committing a file.

cvs commit msql.bat

This will open an editor. Enter the comments and save by using the :wq.

4. Difference between files


You can find the differences between the local file with the latest version of the file in the cvs repository using the diff option.

cvs diff wireless.php

5. Update the file


You can update the local file with the latest version of the file from CVS repository using the update option.

cvs update -A network.dat

6. Update to particular version


You can get a particular version of the file from the cvs. Specify the version number of the file with -j option.

cvs update -j version-number network.bat

7. Adding binary files

You can add binary or image files to the CVS repository. Use the -kb option to add binary files.

cvs add -kb unix.png

8. Removing file from CVS

You can remove unwanted files permanently from the CVS repository using the remove option.

cvs remove linux_system.dat

After issuing this command you have to do a cvs commit. Otherwise the file will not be removed from the repository.

Thursday, 9 January 2020

SSH Command Examples - Unix / Linux

SSH Command, Unix Command, Linux Command, LPI Study Materials

SSH client utility in unix or linux server is used to logging into a remote host and execute commands on the remote machine. The rlogin and rsh commands can also be used to login into the remote machine. However these are not secure. The ssh command provides a secure connection between two hosts over a insecure network.

The syntax ssh command is

ssh [-l username] hostname | user@remote-hostname [command]

Let see the examples of ssh command.

SSH Command Examples:


1. Logging to a remote server


You can login to a remote server from the local host as shown below:

localhost:[~]> ssh -l username remote-server
username@remote-server password:
remote-server:[~]>

Alternatively you can use the below ssh command for connecting to remote host:

localhost:[~]> ssh username@remote-server
username@remote-server password:
remote-server:[~]>

Note: If you are logging for the first time, then it will prints a message that host key not found and you can give yes to continue. The host key of the remote server will be cached and added to the .ssh2/hostkeys directory in your home directory. From second time onwards you just need to enter the password.

2. Logging out from remote server


Simply enter the exit command on the terminal to close the connection. This is shown below:

remote-server:[~]>exit
logout
Connection to remote-server closed.
localhost:[~]>

3. Running remote commands from local host


Sometimes it is necessary to run the unix commands on the remote server from the local host. An example is shown below:

localhost:[~]> ssh user@remote-host "ls test"
online-backup.dat
oracle-storage.bat
unix-dedicated-server.txt

The ssh command connects to the remote host, runs the ls command, prints the output on the local host terminal and exits the connection from remote host.

SSH Command, Unix Command, Linux Command, LPI Study Materials

Let see whether the ls command actually displayed the correct result or not by connecting to the remote host.

localhost:[~]> ssh user@remote-host
user@remotehost password:
remotehost:[~]> cd test
remotehost:[~/test]> ls
online-backup.dat
oracle-storage.bat
unix-dedicated-server.txt

4. Version of the SSH command


We can find the version of SSH installed on the unix system using the -V option to the ssh. This is shown below:

> ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2018

5. Debugging the SSH Client


When we are not able to connect to the remote host, it is good to debug and find the exact error messages that causing the issue. Use the -v option for debugging the ssh client.

ssh -v user@remote-host
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2018
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to remote-host [172.22.200.140] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_dsa type 2
debug1: loaded 3 keys
..........
..........

6. Copying files between remote host and local host.


We can use the scp command to copy the files securely between the local host and remote host using the ssh authentication.

To copy the file from local host to remote hosts /var/tmp/ directory, run the below scp command.

scp filename user@remote-host:/var/tmp/

To copy the file from remote hosts /usr/local/bin/ directory to local hosts current directory, run the below scp command.

scp user@remote-host:/usr/local/bin/add.sh.

Tuesday, 7 January 2020

What is a Arch Linux?

Arch Linux, Linux Study Materials, LPI Guides, LPI Tutorial and Materials

Arch Linux is an independently developed, x86-64 general-purpose GNU/Linux distribution that strives to provide the latest stable versions of most software by following a rolling-release model. The default installation is a minimal base system, configured by the user to only add what is purposely required.

Principles


Simplicity

Arch Linux defines simplicity as without unnecessary additions or modifications. It ships software as released by the original developers (upstream) with minimal distribution-specific (downstream) changes: patches not accepted by upstream are avoided, and Arch's downstream patches consist almost entirely of backported bug fixes that are obsoleted by the project's next release.

In a similar fashion, Arch ships the configuration files provided by upstream with changes limited to distribution-specific issues like adjusting the system file paths. It does not add automation features such as enabling a service simply because the package was installed. Packages are only split when compelling advantages exist, such as to save disk space in particularly bad cases of waste. GUI configuration utilities are not officially provided, encouraging users to perform most system configuration from the shell and a text editor.

Modernity

Arch Linux strives to maintain the latest stable release versions of its software as long as systemic package breakage can be reasonably avoided. It is based on a rolling-release system, which allows a one-time installation with continuous upgrades.

Arch incorporates many of the newer features available to GNU/Linux users, including the systemd init system, modern file systems, LVM2, software RAID, udev support and initcpio (with mkinitcpio), as well as the latest available kernels.

Pragmatism

Arch is a pragmatic distribution rather than an ideological one. The principles here are only useful guidelines. Ultimately, design decisions are made on a case-by-case basis through developer consensus. Evidence-based technical analysis and debate are what matter, not politics or popular opinion.

The large number of packages and build scripts in the various Arch Linux repositories offer free and open source software for those who prefer it, as well as proprietary software packages for those who embrace functionality over ideology.

User centrality

Whereas many GNU/Linux distributions attempt to be more user-friendly, Arch Linux has always been, and shall always remain user-centric. The distribution is intended to fill the needs of those contributing to it, rather than trying to appeal to as many users as possible. It is targeted at the proficient GNU/Linux user, or anyone with a do-it-yourself attitude who is willing to read the documentation, and solve their own problems.

All users are encouraged to participate and contribute to the distribution. Reporting and helping fix bugs is highly valued and patches improving packages or the core projects are very appreciated: Arch's developers are volunteers and active contributors will often find themselves becoming part of that team. Archers can freely contribute packages to the Arch User Repository, improve the ArchWiki documentation, provide technical assistance to others or just exchange opinions in the forums, mailing lists, or IRC channels. Arch Linux is the operating system of choice for many people around the globe, and there exist several international communities that offer help and provide documentation in many different languages.

Versatility

Arch Linux is a general-purpose distribution. Upon installation, only a command-line environment is provided: rather than tearing out unneeded and unwanted packages, the user is offered the ability to build a custom system by choosing among thousands of high-quality packages provided in the official repositories for the x86-64 architecture.

Arch is backed by pacman, a lightweight, simple and fast package manager that allows to upgrade the entire system with one command. Arch also provides the Arch Build System, a ports-like system to make it easy to build and install packages from source, which can also be synchronized with one command. In addition, the Arch User Repository contains many thousands more of community-contributed PKGBUILD scripts for compiling installable packages from source using the makepkg application. It is also possible for users to build and maintain their own custom repositories with ease.

Sunday, 5 January 2020

du Command in LINUX

du Command, Linux Certification, Linux Tutorial and Material, Linux Learning, LPI Guides, Linux Online Exam

While working on LINUX, there might come a situation when you want to transfer a set of files or the entire directory. In such a case, you might wanna know the disk space consumed by that particular directory or set of files. As you are dealing with LINUX, there exists a command line utility for this also which is du command that estimates and displays the disk space used by files.

So, in simple words du command-line utility helps you to find out the disk usage of set of files or a directory.

Here’s the syntax of du command :

//syntax of du command

du [OPTION]... [FILE]...
       or
du [OPTION]... --files0-from=F

where OPTION refers to the options compatible with du command and FILE refers to the filename of which you wanna know the disk space occupied.

Using du command


Suppose there are two files say kt.txt and pt.txt and you want to know the disk usage of these files, then you can simply use du command by specifying the file names along with it as:

//using du command

$du kt.txt pt.txt
8       kt.txt
4       pt.txt

/* the first column
displayed the file's
disk usage */

So, as shown above du displayed the disk space used by the corresponding files.

Now, the displayed values are actually in the units of the first available SIZE from – -block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables and if not in this format then units are default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).

Don’t get puzzled from the above paragraph. We can simply use -h option to force du to produce the output in the human readable format.

Options for du command


◈ -a, – -all option : This option produces counts as output for all files, not for just directories.

◈ – -apparent-size option : This prints the apparent sizes for the files and not the disk usage which can be larger due to holes in files (sparse), internal fragmentation and indirect blocks but in real the apparent size is smaller.

◈ -c, – -total option : This displays a grand total.

◈ -B, – -block-size=SIZE option : This option causes the size to scale by SIZE like -BM prints the size in Megabytes.

◈ -b, – -bytes option : This option is equivalent to – -apparent-size – -block-size=1.

◈ -D, – -dereference-args option : This option is used to dereference only the symbolic links listed on the command line.

◈ -H option : This option is equivalent to the above -D option.

◈ – -files0-from=F option : This is used to summarize disk usage of the NUL-terminated file names specified in the file F and if the file F is “-” then read names from the standard input.

◈ -h, – -human-readable option : This prints the sizes in human readable format i.e in rounding values and using abbreviations like 1 K and this is the most often used option with du.

◈ – -si option: This is much similar to the -h option but uses power of 1000 and not of 1024.

◈ -k option : its equivalent to – -block-size=1K.

◈ -l, – -count-links option : This count sizes many times if files are hard-linked.

◈ -m option : This is equivalent to – – block-size=1M.

◈ -L, – -dereference option : This option dereferences all symbolic links.

◈ -P, – -no-dereference option : This option tells du not to follow any symbolic links which is by default setting.

◈ -0, –null option : This ends each output line with 0 byte rather than a newline.

◈ -S, – -separate-dirs option : This causes the output not to include the size of subdirectories.

◈ -s, – -summarize option : This option will allow to display a total only for each argument.

◈ -x, – -one-file-system option : This will cause du to skip directories on different file systems.

◈ -X, – -exclude-from=FILE option : Exclude files that match any pattern given in FILE.

◈ – -exclude=PATTERN option : It will exclude files that match PATTERN.
-d, – -max-depth=N option : Print the total for a directory (or file, with –all) only if it is N or fewer levels below the command line argument; –max-depth=0 is the same as –summarize.

◈ – -time option : This will show the time of the last modification of any file in the directory, or any of its subdirectories.

◈ – -time=WORD option : This shows time as WORD instead of modification time :atime, access, use, ctime or status.

◈ – -time-style=STYLE option : this shows time using STYLE: full-iso, long-iso, iso, or +FORMAT (FORMAT is interpreted like the format of date).

◈ – -help option : This will display a help message and exit.

◈ – -version option : This will display version info and exit.

Examples of using du command


1. Using -h option : As mentioned above, -h option is used to produce the output in human readable format.

//using -h with du

$du -h kt.txt pt.txt
8.0K    kt.txt
4.0K    pt.txt

/*now the output
is in human readable
format i.e in
Kilobytes */

2. Using du to show disk usage of a directory : Now, if you will pass a directory name say kartik as an argument to du it will show the disk usage info of the input directory kartik and its sub-directories (if any).

/*using du to display disk usage
of a directory and its
sub-directories */

$du kartik
4       kartik/xyz
24      kartik

Above the disk usage info of the directory kartik and its sub-directory xyz is displayed.

3. Using -a option : now, as seen above only the disk usage info of directory
kartik and its sub-directory xyz is displayed but what if you also want to know the disk usage info of all the files present under the directory kartik. For this, use -a option.

//using -a with du

$du -a kartik
8       kartik/kt.txt
4       kartik/pt.txt
4       kartik/pranjal.png
4       kartik/xyz.png
4       kartik/xyz
24      kartik

/*so with -a option used
all the files (under directory
kartik) disk usage info is
displayed along with the
xyz sub-directory */

4. Using -c option : This option displays the grand total as shown.

//using -c with du

$du -c -h kt.txt pt.txt
8.0K    kt.txt
4.0K    pt.txt
12.0K   total

/* at the end
total is displayed
for the disk usage */

5. Using – -time option : This option is used to display the last modification time in the output of du.

//using --time with du

$du --time kt.txt
4       2017-11-18 16:00       kt.txt

/*so the last
modification date and
time gets displayed
when --time
option is used */

6. Using – -exclude=PATTERN option : In one of the example above, all the files disk usage related info was displayed of directory kartik. Now, suppose you want to know the info of .txt files only and not of .png files, in that case to exclude the .png pattern you can use this option.

//using --exclude=PATTERN with du

$du --exclude=*.png -a kartik
8       kartik/kt.txt
4       kartik/pt.txt
4       kartik/xyz
24      kartik

/*so, in this case
.png files info are
excluded from the output */

7. Using – -max-depth=N option : Now, this option allows you to limit the output of du to a particular depth of a directory.

Suppose you have a directory named FRIENDS under which you have sub-directories as FRIENDS/college and FRIENDS/school and also under sub-directory college you have another sub-directory as FRIENDS/college/farewell then you can use – -max-depth=N option in this case as:

//using --max-depth=N with du

$du --max-depth=0 FRIENDS
24       FRIENDS

/* in this case you
restricted du output
only to top=level
directory */

Now, for sub-directories college and school you can use :

$du --max-depth=1 FRIENDS
16      FRIENDS/college
8       FRIENDS/school
24      FRIENDS

Now, for FRIENDS/college/farewell you can use –max-depth=2 as:

$du --max-depth=2 FRIENDS
4       FRIENDS/college/farewell
16      FRIENDS/college
8       FRIENDS/school
24      FRIENDS

/*so this is how N
in --max-depth=N
is used for levels */

8. Using – -files0-from=F option : As mentioned above, this is used to summarize disk usage of the NUL-terminated file names specified in the file F and if the file F is “-” then read names from the standard input.

Let’s use this option for taking input from STDIN as:

//using --files0from=F with du

$pwd
/home/kartik

$ls
kt.txt pt.txt xyz

/*now use this option for
taking input from
STDIN */

$du --files0-from=-
kt.txt8 kt.txt
pt.txt4 pt.txt

/* in this case after
giving kt.txt as a input
from STDIN there is need to
press Ctrl+D twice then the
output is shown and same for
pt.txt or any other file name
given from STDIN */

Applications of du command


◈ It can be used to find out the disk space occupied by a particular directory in case of transferring files from one computer to another.
◈ du command can be linked with pipes to filters.A filter is usually a specialized program that transforms the data in a meaningful way.
◈ There also exists some other ways like df command to find the disk usage but they all lack du ability to show the disk usage of individual directories and files.
◈ It can also be used to find out quickly the number of sub-directories present in a directory.

Example of using du with filters


Let’s take a simple example of using du with sort command so that the output produced by du will be sorted in the increasing order of size of files.

$du -a kartik
8       kartik/kt.txt
4       kartik/pt.txt
4       kartik/pranjal.png
4       kartik/xyz.png
4       kartik/xyz
24      kartik

/*now using du to produce
sorted output */

$du -a kartik | sort -n
4       kartik/pt.txt
4       kartik/pranjal.png
4       kartik/xyz.png
4       kartik/xyz
8       kartik/kt.txt
24      kartik

/* now the output displayed
is sorted according to the size */

The sort command along with -n option used causes to list the output in numeric order with the file with the smallest size appearing first.
In this way du can be used to arrange the output according to the size.

That’s all about du command.

Thursday, 2 January 2020

How can CompTIA Linux+ (Powered by LPI) Certification Holders obtain LPIC-1?

CompTIA Linux+ Certifications, CompTIA Linux+ Online Exam, LPIC-1 Study Materials, LPIC-1 Tutorial and Materials

Quick Facts


◉ CompTIA released their own Linux+ exam in 2019 which will not be eligible for obtaining the LPIC-1

◉ Candidates who pass the "Powered by LPI" version of the Linux+ exams (LX0-103 and LX0-104) can still obtain the LPIC-1. CompTIA will continue to offer these two exams until October 1, 2019.

Obtaining the LPIC-1 with your CompTIA Linux+ (Powered by LPI)


The Linux+ Powered by LPI certification, is functionally identical to the LPIC-1 version 4.0 from Linux Professional Institute.

LPIC-1 is the first of a three-tier, comprehensive jobs-oriented Linux skills assessment program.  More about LPIC-1 can be found here, and information about other LPI certifications can be found here.

All certified holders of CompTIA Linux + (Powered by LPI) are eligible to receive the LPIC-1 certification until October 1, 2019, which is when the CompTIA LX0-103 and LX0-104 exams will be retired. Candidates interested in claiming their LPIC-1 certification and continuing with the LPIC certification track should follow these steps:

1. Acquire an LPI ID:

Your LPI ID can be acquired by registering at www.lpi.org/register.

2. Go to the CompTIA website and log in to your account with your CompTIA credentials. 

To forward your CompTIA Linux+ exam results to the Linux Professional Institute (LPI), log into your CompTIA certification account and click on Demographics and then Settings. Click on the LPI preference dropdown to indicate that you want your test results shared with LPI. Please allow 48 hours for LPI to receive your exam results from CompTIA.

3. Once LPI receives your exam results you will receive the LPIC-1 automatically and you will be notified by email. 

Linux Professional Institute encourages all eligible candidates to claim their LPIC-1 certification. There’s no cost to do this.

This year, Linux Professional Institute will launch their membership program, and all certification holders will be eligible to become members. Through the program, LPI will be offering a number of benefits, focusing on career advancement, continuing education, personal networking, community recognition, and advancing common interests in open source at the local level and throughout the world. More information on the program will be available soon.

Background


For nearly a decade, CompTIA has worked with Linux Professional Institute (LPI) to provide its career-oriented skills certification in the configuration and administration of computer systems running the Linux operating system.

Until now, CompTIA has offered the “Linux+ Powered by LPI” certification. This has been functionally identical to, LPI’s LPIC-1 certification -- the first level of a three-tier comprehensive jobs-oriented Linux skills-assessment program.

This year, the partnership will be ending and CompTIA will release its own “Linux+” certification which is completely independent of LPI. It is our understanding that the original “Powered by LPI” version of Linux+ will be offered in parallel with the new one until October 1, 2019.

What has changed in LPIC-1?


Nothing except our routine updates. The multi-level LPIC credential remains the world’s most desired open source certification. We continue to work towards keeping it globally relevant to the needs of employers and those wanting a career in open source. The recently-released version 5, a major update to LPIC-1, demonstrates the latest in our ongoing commitment to track important changes to Linux systems that are important to those seeking employment or entrepreneurship in the field. As an organization we remain committed to reflecting the needs of open source practitioners, which we have done since the day LPI began.

What has changed in the CompTIA Linux+ program?


The new CompTIA Linux+ certification indicates a significant departure from the previous program that was based on LPIC-1. It covers less material and as a result goes from two exams to one. Its exam development process no longer relies on LPI’s global community of open source experts to maintain quality, completeness and relevance to the evolution of Linux.

Holders of the existing “Linux+ powered by LPI” certification have been able, at no cost, to obtain the LPIC-1 designation as well. The new CompTIA Linux+ certification is no longer eligible for this. Therefore it is no longer sufficient or acceptable as a prerequisite for LPI’s advanced LPIC-2 and LPIC-3 programs.

Only holders of the “Powered by LPI” version of Linux+, requiring exams LX0-103 and LX0-104, may obtain LPIC-1 designation in addition to their Linux+ certification.

When will my CompTIA Linux+ certificate expire?


That is up to CompTIA’s policies over which LPI has no control. Previous “Linux+ powered by LPI” certifications whose holders which have obtained LPIC-1 designation remain subject to LPI’s policies (regarding their LPIC-1) and will remain active for five years from the original date of certification. LPI is developing a new membership program which will enable members to maintain their status without additional testing.

What are the advantages of the LPI Linux programs?


Linux Professional Institute has been promoting jobs and entrepreneurship in the field of open source for 20 years. Its proven four-level program of Linux certification enables practitioners around the world to rise to their level of interest using technology models that elevate the world.

◉ Linux Essentials is our most accessible program, proving the skills necessary for entry-level positions using Linux. It provides the basic foundation for branching into web services, software development and specialized fields such as 3D printing.

◉ LPIC-1 is our foundational certification program and readies the career-seeker for environments that require a well-rounded, complete understanding of any Linux system.

◉ LPIC-2 builds on LPIC-1 to prove more-advanced skills in Linux administration, Internet tools and system security for larger installations.

◉ LPIC-3 is the top-level certification that tests specialized enterprise-scale skills required for enhanced network security, high-availability computing and working in mixed environments.

Together the four levels of LPI testing provide a seamless and unmatched progression from open source beginner to enterprise expert. All levels of LPI exams receive the same level of quality and commitment to advancing careers and entrepreneurship in open source.

Source: lpi.org/comptia