New answers tagged

0

cp -a is not quite equivalent to cp -pPR. In particular, at least in newer versions of Solaris, -a implies --preserve=all, while -p only preserves mode,ownership,timestamps. (--preserve=all also preserves additional attributes such as context,links,xattr). From a newer release of Solaris' man page: -a, --archive same as -dR --preserve=all


3

LDOM is the Sun/Oracle hypervisor layer for SPARC machines, and so only works on SPARC hardware (v9 or higher). See https://en.wikipedia.org/wiki/Oracle_VM_Server_for_SPARC You can't run this inside VirtualBox. VirtualBox doesn't emulate SPARC hardware, it's an Intel/AMD virtualisation technology. However you should be able to run Solaris Zones inside ...


0

I'm not entirely sure I followed your rules completely, but it might be easier to use standard utilities (and simplify the rules for what and when to create): find . -type f | split -d -a3 -l $num --filter='zip -@ $FILE.zip' - "$pfx". find is rather obvious, tweak options to your liking. You might want to sort the list before passing its output to split. ...


1

You are writing to the block device (dsk) which is buffered. Should you want to bypass the buffer, you might directly write to the raw device (rdsk, see What are character special and block special files in a unix system? ) by running: dd if=/text of=/dev/rdsk/c5t6d0s0 Your /text file would probably need to have a size exactly multiple of a block size for ...


0

The following test works for me using bash 3 builtin regex engine and does not require external programs: json='"jshdgfjhsdgfjh,"customfield_10701":"Some Branch","customfield_10702ksghdkfsdkfjkj"' regex_hint=customfield_10701 [[ $json =~ $regex_hint\":\"(.+)\", ]] && printf '%s\n' "${BASH_REMATCH[1]}" Prints: Some Branch The regex between '( )'...


4

You can't. It's now in the pool as a single-drive vdev. vdevs can not be removed from a pool. That's the bad news. The worse news is that you've now effectively got a RAID-0 with your raidz2-0 vdev and the c2t13d0 vdev. This is NOT good. It's doubleplusungood. Your options are: to live with the pool you have created backup, destroy and re-create the ...


0

You're right, your pool comprises of two vdevs, the disk c2t13d0 and raidz2-0, which are striped. Unfortunately ZFS doesn't (yet) offer a possibility to remove a vdev from a pool. So your only option is to destroy the pool, recreate it and restore from backup.


0

You don't need to use tr to transform commas into newlines. And then back again. You can tell awk to use a comma as the Input Record Separator (RS). awk -F':' -v RS=',' '/customfield_10701/ { gsub(/"/,"",$2); print $2 }' json.file gsub() is used to remove the double-quotes " (if any) from field 2. If required, you can also use gsub() to remove leading ...


1

As one of the primary authors of the Image Packaging System, I think I can answer this question. I've written about this topic before, so here's a quick summary: pkg(5), the image packaging system (IPS), is a software delivery system with interaction with a network repository as its primary design goal. Other key ideas are: safe execution for zones and ...


1

I found this Q still-unanswered; G-Man and Bratchley have pointed out the error; getuid() returns the "real user ID of the calling process" while geteuid() returns the "effective user ID of the calling process". You can see the difference with this program: #include <stdio.h> #include <sys/types.h> #include <unistd.h> int main (void) { ...


3

If you are sure there are no " characters in the data you're looking for and if there's only one line containing a "customfield_10701" entry in the file, then sed -n 's/.*"customfield_10701":"\([^"]*\)".*/\1/p' e.g., $ cat x ... jshdgfjhsdgfjh,"customfield_10701":"Some Branch","customfield_10702ksghdkfsdkfjkj ... $ sed -n 's/.*"customfield_10701":"\([^"]*...


2

The problem seems to be that, although do.gplot ultimately writes to a PDF file (plotcycles.pdf) it does so by first plotting to the default output device (probably wxt) and then setting the terminal type to pdfcairo and issuing a replot command. There appear to be a number of ways to override the default terminal type - either on the gnuplot command line ...


-1

The Solaris image packaging system is unrelated to the SysV packaging system that is used by several UNIX variants and that was enhanced over the last 35 years. IPS was developed recently after the Sun people made the SysV packaging system network aware on my request and after the SysV packaging system got a major speed thrust from a new data base cache ...


1

You might start by reading that page: http://www.oracle.com/technetwork/articles/servers-storage-admin/o11-083-ips-basics-523756.html There is no connection between SYSV and IPS outside the fact Solaris is derived from the System V release 4.0 Unix branch but Solaris 11 deprecated the System V packaging commands (pkgadd, pkgrm, pkginfo, ...) to the new IPS ...


0

just for the record, if you want something stronger than the ancient cksum command there is also the digest command. With that you can easily generate stronger hashes like md5 and sha-X.


1

I doubt very much that cksum would bother providing any significant formatting options, but cksum file.txt | awk '{ print $1,$2,$3 }' will do what you want.


1

I was wrong about OpenCSW. I just missed adding the git executable to the path. This is still unsupported per their description but it seems to still work. https://www.opencsw.org/packages/git/ Follow the steps listed here and then git should be located here: /opt/csw/libexec/git-core/git


3

Use nawk under Solaris. /usr/bin/awk is the legacy, non POSIX awk with which a script only containing a BEGIN action isn't skipping its stdin. The following statement is appearing in the nawk and /usr/xpg4/bin/awk manual but not in the old awk one: If an nawk program consists of only actions with the pattern BEGIN, and the BEGIN action contains no getline ...



Top 50 recent answers are included