Linux

How to Mount an Uploaded ISO file in Linux

Posted on
If you were limited to access /dev/cdrom, you can still utilize the content of an ISO by uploading and mounting it. The syntax is as the following:mount -o ro,loop <source_path> <target_path>For example, we can mount an uploaded ISO file as a media like this:[root@ovmm ~]# mount -o ro,loop /tmp/ovmm-3.4.2-installer-OracleLinux-b1384.iso /media[root@ovmm ~]# ll /mediatotal 157557drwxr-xr-x. 7 […]
Linux

How to Set Date Time of Linux OS Manually

Posted on
Sometimes, you can’t use NTP to adjust your server time, you can change it by a command line.[root@rac1 ~]# date -s ‘2017-02-18 17:30:00’Sat Feb 30 17:30:00 CST 2017The option “s” is set the time by its following string.[root@rac1 ~]# dateSat Feb 30 17:30:12 CST 2017Chances are, you may need to change a bunch of server […]
FTP

426 Transfer aborted. Data connection closed.

Posted on
When I retrieved a file from a remote host, ftp aborted the transfer immediately….ftp> get alertORCL.log200 PORT command successful.150 Opening data connection for alertORCL.log (3347200 bytes).426 Transfer aborted. Data connection closed.226 Abort successfulAt last, I found the mount point of the local destination folder was full with 100%. I think we all know how to […]
AIX

How to Compare Contents of Two Directories

Posted on
After you copied one directory to another like this:$ cp -rp /path/to/source/directory /path/to/target/or mirrored the source directory to the target one.$ rsync -av /path/to/source/directory/ /path/to/target/directory/You might want to confirm your job is done. Let’s see what we can compare between the two.Total Size$ du -sb /path/to/source/directory; du -sb /path/to/target/directorydu usually returns a proximate result which […]
XFS

How to Shrink XFS File System on Enterprise Linux 7.2

Posted on
Why XFS File System Cannot be Shrunk Directly? Why cannot we just lvreduce XFS file system? A quote from Red Hat official document talking about XFS space management may explain the whole thing. XFS is a highly scalable, high-performance file system which was originally designed at Silicon Graphics, Inc. XFS is the default file system […]
Linux

How to Authorize Users to Use Crontab

Posted on
Check /etc/cron.deny first If there’s no /etc/cron.allow in your system, please make sure the user (e.g. oracle) that we would like to authorize it here does not show in /etc/cron.deny. /etc/cron.allow takes priority over /etc/cron.deny If you want a positive listing, you can create and add oracle to /etc/cron.allow which will suppress /etc/cron.deny. Create /etc/cron.allow […]
RMAN

How to Backup RMAN Configuration Daily

Posted on
Backup RMAN Configuration RMAN can backup almost everything at any state of execution time, includes data, archive logs, even control file and spfile, but I see nothing about the configuration of itself. For saving the current configuration of RMAN for re-creating the configuration on the same or different database in the future. Here I introduce […]
Linux

How to Resolve Crontab Error crontab: installing new crontab “/tmp/crontab.vqE76q”:1: bad command errors in crontab file, can’t install.

Posted on
crontab: installing new crontab When I tried to save and quit editing crontab, I met an error like this: [oracle@test ~]$ crontab -e crontab: installing new crontab “/tmp/crontab.vqE76q”:1: bad command errors in crontab file, can’t install. Format Issues Please be sure the format of your cron job comply with the following.  ┌───────────── min (0 – […]