find . -type f -mtime -1 -exec mv ‘{}’ /ora/bin \;
This will move all files found that were created that day to the directory /ora/bin.
November 8, 2016
Comments Off on Find and move files
find . -type f -mtime -1 -exec mv ‘{}’ /ora/bin \;
This will move all files found that were created that day to the directory /ora/bin.
October 31, 2016
Comments Off on Useradd on Solaris 11.2
useradd -u 200 -d /export/home/oracle -g oinstall -G dbadmin -m -s /bin/bash -c “RDBMS install user” oracle
Now, what does it mean?
-u = userid (it is convenient to keep this the same on multiple systems)
-d = home directory
-m = make the home directory if it doesn’t exist (believe me, it’s quite frustrating if you don’t (know) use this one.)
-s = which shell to use
-c = comment about the user
and at the end the user’s username.
source https://docs.sun.com/
UPDATE::
I noticed that the order in which the flags are given are important on version 11.2:
source https://docs.oracle.com/ & Jeff Taylor’s Weblog
And let’s add some X11 related packages in the mix so we can connect via an X-terminal:
pkg install xauth
pkg install x11/diagnostic/x11-info-clients
pkg install xclock
pkg install library/motif
July 22, 2016
Comments Off on Mailing from *nix
So, a couple of updates since last or last-er:
Using mailx to send a mail with attachment:
mailx -m -r sender_user@example.org -s "Subject header" -a /file/to/attach.log receiver_user@example.org
With uuencode to attach a file:
uuencode <source_file> <target_file> | mailx -m -r sender_user@example.org -s "Subject header" receiver_user@example.org
With mutt to attach a file:
echo "This is the message body" | mutt -a "/file/to/attach.log" -s "Subject header" -- receiver_user@example.org
March 20, 2013
Comments Off on Find and delete files older than today in current directory
find . -mtime +0 -exec rm -f {} \;
or
find /any/directory/you/may/have/ -type f -mtime +15 -exec rm -f {} +
February 6, 2013
Comments Off on Attach to datapump job when jobname is in lowercase
server01(database01):/home/oracle>expdp userid=dpuser ATTACH='\"dpjob1414698371\"' Export: Release 10.2.0.4.0 - 64bit Production on Wednesday, 06 February, 2013 14:25:31 Copyright (c) 2003, 2007, Oracle. All rights reserved. Password: Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Job: dpjob1414698371 Owner: DPUSER Operation: EXPORT Creator Privs: FALSE GUID: D421B4DB34AE6236E04400144F2ABBF8 Start Time: Wednesday, 06 February, 2013 14:25:38 Mode: SCHEMA Instance: database01 Max Parallelism: 1 EXPORT Job Parameters: Parameter Name Parameter Value: DATA_ACCESS_METHOD AUTOMATIC ESTIMATE BLOCKS INCLUDE_METADATA 1 KEEP_MASTER 0 State: IDLING Bytes Processed: 9,289,692,760 Percent Done: 60 Current Parallelism: 1 Job Error Count: 0 Dump File: /oradump/20130125_1414698371.dmp01 bytes written: 9,977,094,144 Dump File: /oradump/20130125_1414698371.dmp%u Worker 1 Status: State: UNDEFINED Object Schema: SCHEMASOURCE Object Name: WORKFLOW_PROCESS Object Type: SCHEMA_EXPORT/TABLE/TABLE_DATA Completed Objects: 15 Total Objects: 583 Worker Parallelism: 1 Export> kill_job Are you sure you wish to stop this job ([yes]/no): yes
February 6, 2013
Comments Off on FIND | SED
Just a quick bite:
find and pre-/append for formatting datafiles to use in create controlfile script:
find /m*/oradata/${SID} -type f | sed "s/^/'/;s/$/'/"
Result:
'/m001/oradata/database01/database01pdtdc00101.dbf' '/m001/oradata/database01/database01posdl01.dbf' '/m001/oradata/database01/database01posdm03.dbf' '/m001/oradata/database01/database01sysaux01.dbf' '/m002/oradata/database01/database01pserrc00201.dbf' '/m002/oradata/database01/database01phvcf00101.dbf'
October 8, 2011
Comments Off on Creating raidz zpool with ZIL, mirrored cache and spares
Creating raidz zpool with ZIL, mirrored cache and spares == {Pretty straightforward}: Read the rest of this entry »
October 8, 2011
Comments Off on Mirroring the rpool
As you may notice below, this is a VM with plenty of disks, the intention is to have a mirrored rpool with a ZFS ZIL. There are two 16Gb disks for the rpool, one 10Gb disk for the ZIL and ten (10) 5Gb disks for a RAIDZ2 zpool. This post will show how to mirror the rpool on Solaris Express 11, it is a shameless ctrl-c/ctrl-v of this blogpost. But it works none-the-less… Read the rest of this entry »
March 9, 2011
Comments Off on Oracle Solaris 11 Express: change from nwam DHCP to ipadm static IP
So, way back when I wrote this post, I thought I was done with it.
Seems the procedure described then, isn’t any good now. At least, come Hell or high water, I could not get a static IP and enjoy it…
Till this pdf crossed my digital path, and sure enough… I got a static IP which worked (skip to page 17: “Configuring Network Resources”).
Below the transcript: Read the rest of this entry »
November 26, 2009
Comments Off on Display IRQ settings in OpenSolaris
Source: click
Essentially it comes down to this, as root: Read the rest of this entry »
August 19, 2009
Comments Off on unable to qualify my own domain name
Received sendmail errors, looked it up on internet. Turns out I didn’t fill out my /etc/hosts file correctly.
Here’s what’s what: Read the rest of this entry »
August 14, 2009
Comments Off on Mounting NTFS usb HDD on OpenSolaris
Not sure if I ever posted this before. Couldn’t find it none the less, so here goes:
To be able to mount NTFS and/or EXT2fs usb HDD, read this post on OpenSolaris forums. It will give a link to genunix where you can download 2 packages and a txt file with instructions.
Works every time, wish I could say the same for the functionality of smb/server.
May 11, 2009
Comments Off on Fixing the network configuration on my OpenSolaris box
If you have read this post, then you would have known i have this motherboard and that it has two nic’s. Now during the installation, i just went with the default and that means it is automatically configured via nwam (see this pdf -page 11- or this page, they’re practically the same!). Of course, i can’t have that…
So, here’s howto configure it manually, just the way you like it:
First, see what the status is of – and disable nwam: Read the rest of this entry »
March 28, 2009
Comments Off on OpenSolaris 2008.11 xVM Hypervisor
So, here i am. Trying to setup a Solaris xVM hypervisor….
Installed OpenSolaris using the ‘install’ icon on the desktop of the livecd.
According to the package manager, SUNWxvmdom, SUNWxvmipa and SUNWxvmpv were already installed, so i downloaded the rest (available via the package repository from opensolaris.org): SUNWvirtinst, SUNWvirt-manager and SUNWxvm. Those 3 were prox. 8 Mb in size. Read the rest of this entry »
December 30, 2008
Comments Off on T-bit and S-bit on *nix
December 29, 2008
Comments Off on Useradd on Solaris
useradd -u 200 -d /export/home/oracle -g oinstall -G dbadmin -m -s /bin/bash -c “RDBMS install user” oracle
Now, what does it mean?
-u = userid (it is convenient to keep this the same on multiple systems)
-d = home directory
-m = make the home directory if it doesn’t exist (believe me, it’s quite frustrating if you don’t (know) use this one.)
-s = which shell to use
-c = comment about the user
and at the end the user’s username.
source https://docs.sun.com/
UPDATE::
I noticed that the order in which the flags are given are important on version 11.2:
/usr/sbin/useradd -u 54321 -m -d /export/home/oracle -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba -s /bin/bash -c “RDBMS install user” oracle
/usr/sbin/useradd -u 54322 -m -d /export/home/grid -g oinstall -G asmadmin,asmdba,dba -s /bin/bash -c “INFRASTRUCTURE install user” grid
November 26, 2008
Comments Off on Find and do things in *nix
Find stuff in *nix:
find /file_system/file_system -name file_name -type f -exec rm {} ;
What this does is, find files (-type f) with the name file_name in given file_system and executes rm
August 29, 2008
Comments Off on Kill a nohup process
Of course you can use kill -9 pid, but sometimes you just can’t find the pid.
In that case try: fg.
March 6, 2008
Comments Off on Log in as root from other than /dev/console
Edit /etc/default/login with your editor (probably vi). Navigate to the line which reads
Read the rest of this entry »
March 2, 2008
Comments Off on Apache2 on Solaris 10
March 1, 2008
Comments Off on Solaris + MD5
Whadda ya’ know, Solaris doesn’t come shipped with MD5 but (!) using digest, you can come a long way:
Read the rest of this entry »
January 6, 2008
Comments Off on UFS: export a filesystem to a container,..
UFS: export a filesystem to a container and remove the filesystem from the configuration:
Read the rest of this entry »
December 20, 2007
Comments Off on Counting lines on *nix
To count number of process occurrences on *nix:
ps -ef|grep search_attribute|wc -l
December 7, 2007
Comments Off on Tarring
Create TAR file:
tar -cvf archive_file.tar file_to_archice.doc
Append a file to a TAR file:
tar -uvf archive_file.tar file_to_archice.doc
Extract a TAR file:
tar -xvf archive_file.tar directory_to_extract
List the contents of a TAR file:
tar -tvf archive_file.tar
November 29, 2007
Comments Off on Remove an entire directory in *nix
Even when it’s used:
rm -rf /file_system/file_system/fil…..
November 29, 2007
Comments Off on Disk Usage in *nix
du -h /file_system | sort -n | tail -10 grep -v parameter
What this does is, give a result with the items in a given file system that sorted according to their size and only the top ten.
The grep -v excludes the parameter given.
November 26, 2007
Comments Off on Mailing from unix
If you regard mailing from unix as quite a hassel, see the following:
uuencode old_file_name new_file_name | mailx -r reply_address -s “subject” to_address
In this manner, the file that you send with mailx, will be attached via uuencode.
If you need to send more files, tar hem.