Tag Info

Hot answers tagged

6

Here is a portable way: find / -type d -exec test {} = /zones \; -prune -o -type d -print Note that GNU find might be available on an alternate directory depending on the Solaris release you are using (like /usr/sfw/bin/gfind, /usr/gnu/bin/find, ...).


5

Here is a POSIX way to prune any non readable directory with find : find . \( -exec sh -c ' if [ ! -r "$1" ] ; then { exit 1 ; } ; else for i in "$1"/* ; do if [ -d "$i" -a ! -r "$i" ]; then exit 1; fi; done; fi ' sh {} \; -o -prune \) -a -print Note that if this is a full Solaris installation, GNU grep is available in /usr/sfw/bin/ggrep.


4

svcadm restart ldap/client should do the trick. Depending on what you're running you might also need to restart filesystem/autofs


3

Solaris has a built in format command which has analyze and purge subcommands to do this. See https://blogs.oracle.com/cmt/entry/erasing_disks_securely for more information.


2

GNU find or BSD find will do the trick for you: find <DIRECTORY> -type f -amin +55 -name \*<PATTERN>\* -print this will print all files with name PATTERN in DIRECTORY which where accessed greater than 55 mins ago.


2

cmdk@0,0:h is the driver instance for a disk. Per the Solaris documentation: The cmdk device driver is a common interface to various disk devices. The driver supports magnetic fixed disks and magnetic removable disks.


2

To find out the names(FMRI) of the SMF services, you can use svcs -a | grep service_name e.g svcs -a | grep ldap Once you know the name of the SMF service name, you can use following to restart that svcadm restart ldap Then you can check the status of the service using svcs ldap A good guide on SMF can be found here ...


1

Boot the alternate SD Solaris instance and add the line to its /rpool/boot/grub/grub.cfg file. Beware that the file might be overwritten by Solaris should your change something in the boot configuration of this Solaris instance using bootadm or similar.


1

Found out the problem: I set the parameter: SYSTEM_OS=`uname -a` before the if statement. Whereas, I should have set it to: SYSTEM_OS=`uname -s` Sorry for the inconvenience.


1

Just filter them out. find . 2>&1 | grep -v "^find: cannot read dir .*: Permission denied$"


1

Your example shows that you specified -p which the quoted documentation explains copies the file permissions from the source instead of using umask. Remove the -p flag if you want to use the umask instead.


1

You can test it (and operate on the file if test holds true) in this way: if [ $(((`date +%s` - `stat -c %Y IOstatDisk2.log`) / 60)) -ge 55 ] then echo "File was modified more than 55 minutes ago" # do something with the file... fi


1

Yes, /etc/inet/hosts (or /etc/hosts) and /etc/inet/ipnodes should be updated manually, they are relative to the network stack and not the hostname of the machine.



Only top voted, non community-wiki answers of a minimum length are eligible