Linux man (manual) Command

Despite the ‘man’ commands, relative simplicity and appearance of unimportance, the ‘man’ command is, perhaps, one of the most important commands to lean in Linux. 

Why the ‘man’ command important?

The true value of the ‘man’ command is that provides access to the online manuals (documentation), which will be consulted often until Linux commands and functions have to be learned and internalized.  Even after learning the more familiar and commonly used Linux command and functions, one will still need to refer the less commonly used capabilities or to confirm something which has been used in a while.

When some the more arrogant Linux users will sometime tell folks with questions to “read the frickin’ manual” (RTFM), the ‘man’ command is what they are usually talking about.  Although there are other perfectly useful reference materials online (e.g., git documentation project) or commercial books, the ‘man’ command should be the go-to place for documentation.  The reason this is actually very simple, if the command or function is installed in your version or environment instance of Linux, then man pages will be available.  Therefore, usually, there will no need to go search on the internet for answers or carrying books around.

The ‘man’ command syntax

The syntax of the ‘man’ command is simple and easy to learn to use.  In fact, the ‘man’ command is so easy to use that people frequently will not even use options when they use the man command and enter ‘man’ command and the keyword.

‘man’ command syntax

man [options] (keywords)

Simple examples to illustrate how to use the ‘man’ command.

Example to pull up the ‘Man’ command documentation

[blog-server ~]$ man man

In this example, the man command is using ‘man man’ to pull up its own online documentation.

Example to pull up the ‘ls’ command documentation

[blog-server ~]$ man ls

In this example, the man command is using ‘man ls’ to pull up the ‘list directory contents‘ online documentation.

list directory contents

Example to pull up the ‘cp’ command documentation

[blog-server ~]$ man cp

In this example, the man command is using ‘man cp’ to pull up the ‘copy files and directories ‘ online documentation.

Example screenshot of the ‘cp’ (copy files and directories) file command online documentation

How to install locate command in Linux Redhat and Centos

To install the locate command (mlocate) in Redhat or Centos, use the ’YUM’ command, install function. 

  • Logon as ‘root’ or use with ‘sudo’ permissions
  • Then, run a ’man’ command to confirm that the locate command is not already installed: ‘man locate’

Example ‘man’ command (as root user)

[root@blog-server ~]# man locate

  • If the ’man’ documentation page returns, then it is already installed.  If no ’man’ documentation page is returned, then run the ‘yum install’ command.
  • Run the ‘yum install’ command as ‘root’ or ‘sudo’ user:

Example ‘yum install’ command (as root user)

[root@blog-server ~]# yum install mlocate

Example ‘yum install’ command (as sudo user)

[root@blog-server ~]# sudo yum install mlocate

Then run the [root@data-server ~]# updated

Example Run ‘updatedb’ Command (as Root user)

[root@blog-server ~]# updated

Example Run ‘updatedb’ Command (as sudo user)

[root@blog-server ~]# sudo updatedb

How To quit the Linux vi editor without saving changes

To quit the Linux ’vi’ editor without saving any changes which have been made:

To Exit the insert or append mode

  1. From within insert or append mode, press the ‘Esc‘ key.

To Enable VI Command Line

  1. Press the ‘:’ (colon) Key. The cursor should reappear in the lower-left corner of the screen beside a colon prompt.
  2. Then, Enter the ‘q!’ Command and press the ‘Enter’ Key.

Example VI Command Line

: q!

This will quit the Linux VI editor, and all changes the document made in this session will be lost.

Linux Move (mv) Command

The Linux move command (mv) is one of the essential commands, which can be very useful in Linux, Unix, and AIX.  The primary purpose of the move command is obviously to move files, and of course, directories.   The move command may also be used to rename files and to make backups.

Move Command Syntax

$ mv [options] source (file or directory)  destination

Move Command options

option description
mv -f force move by overwriting destination file without prompt
mv -i interactive prompt before overwriting
mv -u update – move when the source is newer than the destination
mv -v verbose – print source and destination files
MV – t explicitly saying to move the file or directory here, rather trying to fit everything into the last argument.
mv * Move all (Multiple) files to a specific director without listing by name

For More move command details see the Linux documentation manuals using the man command

$ man mv

mv command examples

Here are some quick and very simple move command (MV) examples for reference.

Move Move to files  to the /Archive/ directory:

$ mv happy.txt garden.txt /Archive/

Move all “.txt” files in the current directory to subdirectory backup:

$ mv *.txt backup

Move all files in subdirectory ‘backup’ to current directory:

$ mv backup/*

Rename file happy.txt to happy.bak filename:

$ mv happy.txt happy.bak

Rename directory backup to backup2:

$ mv backup backup2

Update – move when happy.txt is newer or missing in target directory:

$ mv -u happy.txt backup

Move happy.txt and prompt before overwrite backup / happy.txt:

$ mv -v happy.txt backup

Is a Multi-Cloud Strategy A Fit For your Enterprise?

Enterprises and cloud computing become more integrated and essential for gain or maintain a competitive advantage through big data and Analytics. Cloud is now essential in improving operations efficiency and synergy. To optimize the enterprise architecture with the cloud, there are a few strategic questions need to be considered;

  • First, how much cloud business does your enterprise need?
  • And, what cloud strategy best meets your enterprise operational and security needs?
  • Where do private, public clouds, or hybrid cloud fit in your enterprise’s information workload deployment strategy?
  • Does multi-cloud fit in the enterprise’s information workload deployment strategy?

What is A Multi-cloud Strategy?

This probably is the point where the narrative should introduce the principle of multi-cloud. A multi-cloud is an approach to cloud computing which seeks to optimize enterprise costs, Return-On-Investment (ROI), and enabling big data analytics, which is already evolving the information workload deployment strategy of many organizations. Multi-cloud has already affected the major software and Software-As-A-Service (SaaS) providers, which have been rapidly evolving their application suites to enable this new reality.  As recently as this week, IBM announced that they had moved its Cloud-native software architecture.

Is It Time To Consider A Multi-Cloud Strategy For Your Enterprise?

Multi-cloud is a cloud computing strategy seeks to align from different cloud providers capability to optimize different business operations and technical requirements. A multi-cloud strategy can be a way to reduce the dependence upon more traditional software vendors and or on a single cloud service provider.

Advantages Of A Multi-Cloud Strategy

The advantages of a multi-cloud enterprise information workload deployment strategy are:

  • the enterprise can still operate even if one or more of the clouds providers goes offline or encounter other difficulties.
  • enterprises can avoid vendor lock-in since the enterprise’s data is stored on different clouds service providers and could be migrated if need be.
  • Multi-cloud can provide a reduction in the scales of data breach vulnerability since breaching one cloud does not provide access to the entire data of your enterprise, even if your organization has not implemented hybrid-cloud (private/public) strategy because all the data simply isn’t all housed one cloud.
  • Importantly, multi-cloud solutions are customizable. Every enterprise can select what works best in order to achieve optimal efficiency.

Disadvantages Of The Multi-Cloud

The multi-cloud enterprise information workload deployment strategy has downsides as well. For instance:

  • integration across the multi-cloud providers may require more planning, relationship management, and strategic oversight.
  • Multi-cloud implementations, while reducing the potential scale of any one security breach, it does provide more than one potential breach point to be monitored, managed, and mitigated.

Conclusion

Based on your enterprise’s industry, use of big data technologies, information security needs and the use information analytics to gain or maintain a competitive advantage and or comparative advantage, a multi-cloud enterprise information workload deployment strategy has a place in optimizing your enterprises technical and information strategy.  Especially when your multi-cloud strategy includes a hybrid-cloud (public/private) as a major pillar in your cloud strategy. 

Related References

Linux VI Command – Set Line Number

The “Set Number” command in the VI (visual instrument) text editor seems may not seem like the most useful command.  However, it is more useful than it appears.  Using the “set number” command is a visual aid, which facilitates navigation within the VI editor. 

To Enable Line Number In the VI Editor

The “set Number” command is used to make display line numbers, to enable line numbers:

  • Press the Esc key within the VI editor, if you are currently in insert or append mode.
  • Press the colon key “:”, which will appear at the lower-left corner of the screen.
  • Following the colon enter “set number” command (without quotes) and press enter.

A column of sequential line numbers will then appear at the left side of the screen. Each line number references the text located directly to the right. Now you will know exactly which line is where and be able to enter a colon and the line number you want to move to and move around the document lines with certainty.

To Disable Line Number In the VI Editor

When you are ready to turn offline numbering, again follow the preceding instructions, except this time, enter the following line at the : prompt:

  • Press the Esc key within the VI editor, if you are currently in insert or append mode.
  • Press the colon key “:”, which will appear at the lower-left corner of the screen.
  • Following the colon enter “set nonumber” command (without quotes) and press enter.

To Make The Line Number Enable When You Open VI:

Normally, vi will forget the setting you’ve chosen once you’ve left the editor. You can, however, make the “set Number” command take effect automatically whenever you use vi on a user/account, enter the “set Number” command as a line in the .exrc file in your home directory.

Related References

Using Logical Data Lakes

Today, data-driven decision making is at the center of all things. The emergence of data science and machine learning has further reinforced the importance of data as the most critical commodity in today’s world. From FAAMG (the biggest five tech companies: Facebook, Amazon, Apple, Microsoft, and Google) to governments and non-profits, everyone is busy leveraging the power of data to achieve final goals. Unfortunately, this growing demand for data has exposed the inefficiency of the current systems to support the ever-growing data needs. This inefficiency is what led to the evolution of what we today know as Logical Data Lakes.

What Is a Logical Data Lake?

In simple words, a data lake is a data repository that is capable of storing any data in its original format. As opposed to traditional data sources that use the ETL (Extract, Transform, and Load) strategy, data lakes work on the ELT (Extract, Load, and Transform) strategy. This means data does not have to be first transformed and then loaded, which essentially translates into reduced time and efforts. Logical data lakes have captured the attention of millions as they do away with the need to integrate data from different data repositories. Thus, with this open access to data, companies can now begin to draw correlations between separate data entities and use this exercise to their advantage.

Primary Use Case Scenarios of Data Lakes

Logical data lakes are a relatively new concept, and thus, readers can benefit from some knowledge of how logical data lakes can be used in real-life scenarios.

To conduct Experimental Analysis of Data:

  • Logical data lakes can play an essential role in the experimental analysis of data to establish its value. Since data lakes work on the ELT strategy, they grant deftness and speed to processes during such experiments.

To store and analyze IoT Data:

  • Logical data lakes can efficiently store the Internet of Things type of data. Data lakes are capable of storing both relational as well as non-relational data. Under logical data lakes, it is not mandatory to define the structure or schema of the data stored. Moreover, logical data lakes can run analytics on IoT data and come up with ways to enhance quality and reduce operational cost.

To improve Customer Interaction:

  • Logical data lakes can methodically combine CRM data with social media analytics to give businesses an understanding of customer behavior as well as customer churn and its various causes.

To create a Data Warehouse:

  • Logical data lakes contain raw data. Data warehouses, on the other hand, store structured and filtered data. Creating a data lake is the first step in the process of data warehouse creation. A data lake may also be used to augment a data warehouse.

To support reporting and analytical function:

  • Data lakes can also be used to support the reporting and analytical function in organizations. By storing maximum data in a single repository, logical data lakes make it easier to analyze all data to come up with relevant and valuable findings.

A logical data lake is a comparatively new area of study. However, it can be said with certainty that logical data lakes will revolutionize the traditional data theories.

Related References