Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

NOTE: CentOS Enterprise Linux is built from the Red Hat Enterprise Linux source code. Other than logo and name changes CentOS Enterprise Linux is compatible with the equivalent Red Hat version. This document applies equally to both Red Hat and CentOS Enterprise Linux.

4.10. Using Multiple Commands

Linux allows you to enter multiple commands at one time. The only requirement is that you separate the commands with a semicolon.

Suppose you have downloaded a new file called foobar-1.3-2.i386.rpm and you want to put it in a new subdirectory within your home directory called rpms/, but the subdirectory has not been created. You can combine both the creation of the rpms/ directory and the moving of your downloaded file into the directory by typing the following at a shell prompt:

mkdir rpms/; mv foobar-1.3-2.i386.rpm rpms/

Running the combination of commands creates the directory and moves the file in one line.

 
 
  Published under the terms of the GNU General Public License Design by Interspire