How do you execute a local Fixup or Compact on Mac OS X running an IBM Notes client? Because there is no ncompact or nfixup executable on Apple Mac OS X, you will have to do it a bit different.
I do not use it often, but I always have to search for it...
- Open a Terminal Window
- Switch to the Notes App Directory:
cd /Applications/IBM\ Notes.app/Contents/MacOS
- Set the environment variable DYLD_LIBRARY_PATH:
export DYLD_LIBRARY_PATH="/Applications/IBM Notes.app/Contents/MacOS"
- Switch to the Support subfolder:
cd Support
- Execute NotesFixup or NotesCompact:
./NotesCompact
./NotesFixup
(without options you will do a compact for all databases in your Lotus Notes Data directory
/Users/YourUsername/Library/Application Support/Lotus Notes Data/ )
./NotesCompact mail/your-replica.nsf -c
(or with options for a special database)
A blog about tips and tricks for linux - as I do some development, sometimes I find some good staff which I would like to store somewhere. I will be happy if you find this stuff to be useful for any reason.
Showing posts with label macos. Show all posts
Showing posts with label macos. Show all posts
Thursday, October 15, 2015
Tuesday, April 21, 2015
Monitor network on MacOS with
If you would like to test network connection on your macbook macos, you can run a script, which would say verbally when network is down. Just run this script in one of your terminal window, and it will tell you "Timeout" when internet is down. The script runs continuously. You have to stop it (Ctrl-Z) when you do not need to run it anymore.
Here is the script:
#!/bin/bash
echo begin ping
while :
do
if ping -c 5 8.8.8.8 | grep timeout;
then echo `say "Timeout"`;
else echo `echo "internet is back up"`;
time
fi
done
Here is the script:
#!/bin/bash
echo begin ping
while :
do
if ping -c 5 8.8.8.8 | grep timeout;
then echo `say "Timeout"`;
else echo `echo "internet is back up"`;
time
fi
done
Monday, April 13, 2015
Create a set of large PDFs
Next step after I created a test PDF file, was to create a set of PDF files of different sizes. The initial test file, which I created as was described in my previous post, I called large10MB.pdf, and I combined it multiple times to get a set of files of multiple sizes. I used pdftk server toolkit to combine multiple 10MB-large files together to get a file with appropriate size.
#!/bin/bash
for SIZE in 10 20 30 40 50 60 70 80 90 100 150 200 250 300;
do
num=$(($SIZE/10))
LARGEDOC="large10MB.pdf"
arg=""
for (( c=1; c<=$num; c++ ))
do
arg="$arg $LARGEDOC"
done
command="pdftk $arg testContent.pdf cat output largePDF.${SIZE}MB.pdf"
${command}
echo "<a href='largePDF.${SIZE}MB.pdf'>PDF size ${SIZE} MB.</a><br/>"
done
#!/bin/bash
for SIZE in 10 20 30 40 50 60 70 80 90 100 150 200 250 300;
do
num=$(($SIZE/10))
LARGEDOC="large10MB.pdf"
arg=""
for (( c=1; c<=$num; c++ ))
do
arg="$arg $LARGEDOC"
done
command="pdftk $arg testContent.pdf cat output largePDF.${SIZE}MB.pdf"
${command}
echo "<a href='largePDF.${SIZE}MB.pdf'>PDF size ${SIZE} MB.</a><br/>"
done
Sunday, April 12, 2015
How to create large PDF file in MACos for testing
Recently I needed to create a set of large PDF files to be used for testing. The files had to be very large, and have to be processed by a search engine for indexing. It was important to have a custom content in them, as well as make sure they do not have many images, but a lot of text. That had to be processed later and be available for searching. With the code snippet below you can create a set of such PDF files, and use them for whatever purpose you need to.
Here is how I did it. Step 1. I wrote a simple script, which prepares a text file to be converted to PDF:
#!/bin/bash
echo "" > testContent.txt
for i in {1..5000}
do
echo "Test content to fill into large pdf." >> testContent.txt
done;
cupsfilter testContent.txt > large0.pdf 2>/dev/null
Note that you should be able to adjust amount of text you would like to see in the file, and the text itself, so the content looks exactly how you want to see it. The final large0.pdf if the test PDF file, which you need. cupsfilter command (http://linux.die.net/man/8/cupsfilter) actually converts text file into another format, by default into PDF.
You can read more about cupsfilter by reading cupsfilter connmmand syntax description on developer.apple.com
I will show in next article, how from a single PDF file you can create a set of files of multiple sizes.
Here is how I did it. Step 1. I wrote a simple script, which prepares a text file to be converted to PDF:
#!/bin/bash
echo "" > testContent.txt
for i in {1..5000}
do
echo "Test content to fill into large pdf." >> testContent.txt
done;
cupsfilter testContent.txt > large0.pdf 2>/dev/null
Note that you should be able to adjust amount of text you would like to see in the file, and the text itself, so the content looks exactly how you want to see it. The final large0.pdf if the test PDF file, which you need. cupsfilter command (http://linux.die.net/man/8/cupsfilter) actually converts text file into another format, by default into PDF.
You can read more about cupsfilter by reading cupsfilter connmmand syntax description on developer.apple.com
I will show in next article, how from a single PDF file you can create a set of files of multiple sizes.
Subscribe to:
Posts (Atom)