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

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

Useful Links – AIX

Here are a few references for IBM AIX/UNIX, which may be helpful.

AIX Comand Documentations

Useful Links – Linux

Here are a few useful references for Linux, which may be helpful.

Linux Documentation

Bash Documentation

Links for Major Linux Distributions

CentOS

Red Hat Enterprise Linux (RHEL)

Ubuntu

The most Important Linux Distributions To Learn Professionally

Many of us either want a way to import our Linux knowledge, improve our technical career options or perhaps, move into the technology career.  To do any of these efficiently them, the first step would be to focus on the major Linux distribution used by employers. 

The most adapted distributions Linux are Red Hat Enterprise Linux (RHEL) and Ubuntu, so, of the multitude of Linux distributions available, these would be the to learn if you want to move your career forward.

However, if you are seeking an inexpensive alternative to hone your Linux skills at home, then CentOS, is likely your best choice since it is free and is pretty much a copy of RedHat.

Related References

What is AIX?

AIX (Advanced Interactive eXecutive) is an operating system developed by IBM for business all across the world that needs data metrics that can keep up with the ever-changing scope of business in today’s world. AIX is a version of UNIX. AIX is designed to work on a number of computer platforms from the same manufacturer. On its launch, the system was designed for IBM’s RT PC RISC workstation.

User interface

AIX was developed with Bourne Shell as the default shell for three versions of the OS. Afterwards, it was changed to KornShell going forward from version 4. The OS uses Common Desktop Environment (CDE) as the default user interface for graphics. The System Management Interface Tool on the OS allows users to access the menu using a hierarchy of commands instead of the command line. 

Compatible systems

The operating system works on a number of hardware platforms. The initial OS was designed for the IBM RT PC and used a microkernel that controlled the mouse, disk drives, keyboard, and display. This allowed users to use all these components between operating systems by the use of a hot key-the alt+tab combination. The OS was also fitted on newer systems such as the IBM PS/2 series, IDM mainframes, AI-64 systems and can also be used with the Apple’s server network. AIX is commonly used on IBM’s 64-bit POWER processor and systems. AIX can run most Linux applications (after recompiling) and has full support for Java 2.

Since its introduction to computer infrastructure, the operating system has undergone a lot of upgrades with five versions released since 2001. The latest version of the software is the AIX 7.2. All of these come with a high tech security system and fast uptimes.

As an operating system AIX has become popular with students who learn quickly by working on AIX projects live. Working professionals have also been attracted by the dependability of the system and the intuitive that is part of its design.

Related References

Best Linux Distros for Beginners

For those people who dip their toe into Linux systems for the first time, the endless options for distributions can be overwhelming, mainly when you are unsure for what to search. Just a few years ago when Linux was still in its early stages, this task would be much more comfortable as you could choose one of which you have heard about or have experienced. However, the increasing number of available distros and their vocal fans makes it challenging to settle on one.
So if you are new to this platform and don’t know where to start, here are top 5 best Linux distros for beginners to check out.

CentOS is a Linux distribution, which is derived from the sources of Red Hat Enterprise Linux and therefore has an obvious advantage for folks wanting to learn, improve, and practice their skills. Especially, since it is a free distribution and there are courses available to get you started on training sites like Udemy. the relationship between CentOS and Rehat make the skill and commands learn transferable since Redhat is a major Linux distribution us by businesses.

Ubuntu Linux

A list of Linux distros can’t be complete without the Ubuntu Linux. Indeed, most Linux distros come from Ubuntu simply because it is among the most user-friendly and stable ones available.
Just like other modern systems, Ubuntu Linux includes its app store named Ubuntu Software. You can find a collection of numerous apps to install. Though they might look entirely unfamiliar at the beginning, any mobile or computer user would learn how to use it quickly without a learning curve.
Ubuntu Linux comes with the installed software, which may include the web browser Firefox, office suite LibreOffice, webcam app Cheese, email client Thunderbird, and more.

Ubuntu Linux Pros

  • Easy to learn and use
  • Great support from the community
  • Quick to install and set up
  • Elegant and stylish design
  • Modern and user-friendly interface

Ubuntu Linux Cons

  • Ubuntu Linux has higher operating system requirements

Elementary OS

If you are a macOS user, then the Elementary OS Linux distro will be familiar. The developers try to create a global design that can make every element on the desktop feel and look similar for macOS users.


The Elementary OS desktop apps are launchable from the Dock or Applications menu. Power, network, notifications, and sound options are in the top bar, also known as the Wingpanel.
The AppCenter allows you to install essential applications to get your tasks done. Overall, Elementary OS is a great Linux distro for beginners and is simple to use.

Elementary OS Pros

  • Perfect hardware recognition
  • Minimalist interface resembling macOS
  • Simple to use
  • Ubuntu Foundation

Elementary OS Cons

  • A limited number of installed applications

Zorin OS

If you are a fan of Windows, the Zorin OS would be a great Linux distro for you. It comes with a familiar desktop interface that is gorgeous and simple to navigate. You can also switch to other interfaces to meet your tastes. These include GNOME3, Window XP, and Window 7.
Zorin OS is the only distro in this list designed with Windows users in mind. It includes Wine, a compatibility layer which makes it possible to install Windows apps on Linux. The distribution also integrates PlayOnLinux, a graphical app store to set up many Windows applications.

ZORIN OS Pros

  • Ideal for Windows users
  • An excellent collection of installed applications
  • Modern and elegant interface
  • You can change the interface to suit your preferences

ZORIN OS Cons

  • It takes time to learn

Linux Mint

Linux Mint is another Linux distro based on Ubuntu. Linux Mint offers 3 choices of desktops: Xfce, Mate, and Cinnamon. Each option has its pros and cons, but the Cinnamon is probably the best one for beginners.


This distro integrates familiar components on the desktop such as system tray, start button, or clickable icons. That’s why Linux Mint is an excellent option for those who are new to Linux.
Also, the Linux Mint is very lightweight as it only runs on 9 GB space of hard disk and 512 MB RAM. The lightweight footprint means you could load it up on an older PC and test before setting up on newer hardware.

Linux Mint Pros

  • Require low hardware
  • Great collection of default applications
  • Simple and user-friendly interface
  • Ubuntu Foundation

Linux Mint Cons

  • The interface is a bit old-fashioned

Ubuntu Budgie

Ubuntu Budgie is a gorgeous and straightforward Linux distro for beginners. Ubuntu Budgie has many new features on its Budgie desktop, such as the main menu, a dock, and a panel which includes notifications and some extras. Also, there are many other pre-installed apps to meet your needs, including LibreOffice, web browser Chromium, movie player GNOME MPV, webcam booth, and email.


Also, Ubuntu Budgie comes with a night light choice for those who often do plenty of work during the night and need to reduce the brightness. Ubuntu Budgie simplicity and beauty makes an impression.

Ubuntu Budgie Pros

  • Simple to learn
  • Ubuntu Foundation
  • The interface is gorgeous
  • Many default applications

Ubuntu Budgie Cons

  • Support could be unreliable

Conclusion

There are several things you should know about Linux distros:

  • You can download all of these distributions for free as .iso image files.
  • These distributions can be operated very well on most standard PC hardware, either laptops or desktops.
  • You need to burn ISO images to either a USB flash drive or CD/DVD.
  • It is possible to run all of these Linux distros as “live” instances, which means that you could boot your operating system from the flash drive or CD/DVD and run directly from the RAM of your PC without setting up anything.

Related References