If you get this error, you probably have one of the following things wrong:
- You've forgotten the slash and semicolon in the find command. Use find command like this:
# find /tmp -mtime +5 -type f -exec rm {} \;
- If you get this error from crontab, then you should add an extra slash to the slash and semicolon. Use the find command like this:
0 2 * * * find /tmp -mtime +5 -type f -exec rm {} \\;
If you wish to put AIX files on a CD, you *COULD* use Windows. But, Windows files have certain restrictions on file length and permissions. Also, Windows can't handle files that begin with a dot, like ".toc", which is a very
important file if you wish to burn installable filesets on a CD.
How do you solve this problem?
- Put all files you wish to store on a CD in a separate directory, like: /tmp/cd
- Create an ISO file of this directory. You'll need mkisofs to accomplish this. This is part of the AIX Toolbox for Linux. You can find it in /opt/freeware/bin.
# mkisofs -o /path/to/file.iso -r /tmp/cd
- This will create a file called file.iso. Make sure you have enough storage space.
- Transfer this file to a PC with a CD-writer in it.
- Burn this ISO file to CD using Easy CD Creator or Nero.
- The CD will be usable in any AIX CD-ROM drive.
Let's say you wish to calculate with dates within a Korn Shell script, for example "current date minus 7 days". How do you do it? There's a tiny C program that can do this for you, called ctimed. You can download it here: ctimed.tar.
Executable ctimed uses the UNIX Epoch time to calculate. UNIX counts the number of seconds passed since Januari 1, 1970, 00:00.
So, how many seconds have passed since 1970?
# current=`./ctimed now`This should give you a number well over 1 billion.
How many seconds is 1 week? (7 days, 24 hours a day, 60 minutes an hour, 60 seconds an hour):
# let week=7*24*60*60# let aweekago="$current-$week" Convert this into human readable format:
# ./ctimed $aweekagoYou should get something like: Sat Sep 17 13:50:26 2005
If you wish to clone a system with a mksysb, then you can do so, but you do not want your cloned system to come up with the same TCP/IP information. Just issue rmtcpip before creating the mksysb, and you have a perfect image for cloning to another system. Be sure to issue this command at a terminal, as you will lose your network connection!
There are times that you would like to create some "load" on the system. A very, very easy way of keeping a processor very busy is:
# yes > /dev/nullThe yes command will continiously echo "yes" to /dev/null. This is a single-threaded process, so it will put load on a single processor. If you wish to put load on multiple processors, why not run yes a couple of times?
Topics: AIX, Monitoring, System Admin↑
Cec Monitor
To monitor all lpars within 1 frame, use:
# topas -C
To quickly show you the processor speed, cpu type, amount of memory and other system information, type:
# lsconfYou can also use prtconf.
To use a DVD-RAM for writing and reading like a file system, use the following commands. This will work only at AIX 5.2 and above:
- Put a DVD-RAM into the drive
# udfcreate -d /dev/cd0
- Mount the DVD-RAM:
# mount -V udfs /dev/cd0 /mnt
If you get an error, ensure /etc/vfs contains this line (and retry the mount command after validating):udfs 34 /sbin/helpers/udfmnthelp
Topics: AIX, Backup & restore, System Admin↑
DVD-RAM Backup
You can use a DVD-RAM to create a system backup. To do so, enter:
# smitty mkdvdThis works in AIX 5.2 and above.
Topics: AIX, System Admin↑
Korn Shell history
To retrieve a list of all recent commands:
# history -100This shows you the last 100 entries.


