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.
$ mv [options] source (file or directory) destination
Move Command options
force move by overwriting destination file
interactive prompt before overwriting
update – move when the source is newer than the
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.
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
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
$ 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:
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
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.
In simple terms, yum is a, command-line interface, package manager utility for computers running the Linux operating system, which augments the RPM Package Manager capabilities. yum is the primary tool for getting, installing, deleting, querying, and managing RPM software packages. Also, yum is used in Red Hat Enterprise Linux (RHEL) versions 5 and later.
In Linux there are lot of ways to disk size and/or space, but the ‘Disk Filesystem’ (df) command is old reliable and has been around a long time. The ‘df’ command provides a summary of disk space and free space, which I find myself coming back to time after time.
From time to time there is a need to package up a folder for any number of reasons which may include things like:
Movement to a new location
Movement to a new server
To keep a backup
Or simply to save space
Compressing a folder is folder can be very useful, but for those of us who don’t do it all the time, it is nice to have a pattern to follow. Also, even an experienced user can get brain cramp, if they have not had a reason to compress a folder in a while. So, here is a simple pattern to follow to compress a folder and its contents.
Basic Command Format
tar -zcvf <<archive-name>>.tar.gz <<directory-name>>
Example Compress Command
tar -zcvf blog_files_backup.tar.gz sqlfiles
Linux tar command line options used here
-z = Compress archive using gzip program
-c = Create archive
-v = Verbose i.e display progress while creating archive
-f = Archive File name
For help with the tar command in Linux
To get additional detail on the tar command in Linux, just need to type:
Here are a few thoughts on effectively working with IBM Infosphere, Information Server, DataStage surrogate key files, which may prove useful for developers.
The main thing about placement is that it be in a consistent location. Developers and production support teams should need to guess or look up where it is for every DataStage project. So, it is best to put the surrogate keys in same base path and that each project has its own subfolder to facilitate migrations and to reduce the possibility of human error. Here Is the patch structure, which is commonly use:
As a best practice, the surrogate key file path should be in a parameter set and the parameter used in the jobs, as needed. This simplifies maintenance, if and when changes to the path are required, and during migrations.
Surrogate Key Parameter Set Screenshot – Example Parameter Tab
Surrogate Key Parameter Set Screenshot – Example Values Tab
Surrogate Key Job Parameter Example Path using Parameter
DataStage must have permissions to:
The entire parent path
The project folder, and
The surrogate key files themselves.
To ensure the DataStage has access to the path and Surrogate files, ensure:
The ‘dsadm’ (owner) and ‘dstage’ (group) have access to folders in the path, with at least a “-rw-r–r–“ (644) permissions level. Keeping the permissions to a minimum can, for obvious reasons, prevent inadvertent overwrites of the surrogate key files; thus, avoiding some, potentially, serious cleanup.
The ‘dsadm’ (owner) and ‘dstage’ (group) have access to the surrogate key files