Visit Counter

Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Wednesday, July 13, 2016

Error with a file name containing parentheses



Solaris 11


When I tried to change file name from abc.file(1).zip to xyz.zip
It's says syntax error I am using Solaris 11.3 Sparc


# mv abc.file(1).zip xyz.zip

bash: syntax error near unexpected token '('



Solution:


The entire file name does not need quoting () do.


# mv 'abc.file(1).zip'  xyz.zip


The file just loaded does not appear to be executable




Solaris 11 installation on Sparc T4-2 Server getting below error after (init 0) OK Prompt


OK> boot cdrom

SPARC Enterprise T4-2 Server, using Domain console
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, Oracle and/or its affiliates and Fujitsu Limited. All rights reserved.
OpenBoot 4.24.15, 49152 MB memory installed, Serial #94022600.
Ethernet address 0:41:28:2:15:9v, Host ID: 10202155z.



Rebooting with command: boot kernel/sparcv9/unix
Boot device: /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/disk@0  File and args: kernel/sparcv9/unix

Can't open kernel/sparcv9/unix
ERROR: FCode Aborted.

Warning: Fcode sequence resulted in a net stack depth change of 1
Evaluating:

Evaluating:
The file just loaded does not appear to be executable.


{0} ok


Solution:




















OK>  devalias

Select DVD option













OK> boot dvd











Tuesday, May 24, 2016

/usr/lib/passmgmt: Unexpected failure. Password files unchanged UX: useradd: ERROR: Cannot update system - login cannot be created.




While creating user in solaris 11 sparc 64-bit getting below error


/usr/lib/passmgmt: Unexpected failure.  Password files unchanged
UX: useradd: ERROR: Cannot update system - login cannot be created.


Solution

root@afi-ssaerp:/etc# pwck

uucp:x:5:5:uucp Admin:/usr/lib/uucp:
        Login directory not found

nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
        Login directory not found
        Optional shell file not found


# zpool list

NAME      SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
datapool  680G   557G   123G  81%  1.00x  ONLINE  -
rpool     136G   133G  2.74G  97%  1.00x  ONLINE  -


I checked the pools....almost full  I just release some space issue was resolved.



Wednesday, July 29, 2015

Enable Xmanager in Solaris 10






# uname -a
SunOS SUN-2 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V240


 # svccfg

svc:> select cde-login
svc:/application/graphical-login/cde-login> listprop arg
dtlogin/args astring

svc:/application/graphical-login/cde-login> setprop dtlogin/args=astring:" -udpPort 177"
svc:/application/graphical-login/cde-login> quit


# svcadm restart cde-login


# ps -ef |grep dtlogin
root 25145 23150 0 06:22:50 pts/1 0:00 grep dtlogin
root 24997 1 0 06:22:01 ? 0:00 /usr/dt/bin/dtlogin -daemon -udpPort 177

Tuesday, July 28, 2015

Changing Mount point in Solaris 10 Sparc





# cd /

#  umount /data1

# mkdr /ora

#  mount /dev/md/dsk/d6  /ora


#  vi  /etc/vfstab

/ora              (Existing name is data1)


# df -h

# cat /etc/vfstab

#  metastat


Monday, November 24, 2014

Find a File by Name in UNIX, Solaris, or Linux




Using the find command, one can locate a file by name.

To find a file such as filename.txt anywhere on the system:

# find  /  -name   filename.txt  -print


# find /export/home  -name  core   -print



/export/home/bsp/core
/export/home/alauddin/core
/export/home/khalil/core
/export/home/ashif/core
/export/home/rmohan/core
/export/home/arsalan/core
/export/home/edu/core
/export/home/ayman1/core
/export/home/crizaldo/core
/export/home/farooqa/core
/export/home/roger/core
/export/home/iype/core
/export/home/jamsheer/core
/export/home/farhat/core
/export/home/kamar/core
/export/home/karim/core
/export/home/khaja/core
/export/home/bokka/core
/export/home/libin/core
/export/home/ouseph/core
/export/home/moamen/core
/export/home/murali/core
/export/home/mnabil/core
/export/home/pradeep/core
/export/home/pradeepa/core
/export/home/greg/core
/export/home/ronnie/core
/export/home/muneer/core
/export/home/micheal/core
/export/home/essa/core
/export/home/anshad/core
/export/home/vinesh/core
/export/home/ummar/core
/export/home/victor/core
/export/home/waseem/core
/export/home/ajith/core
/export/home/elefatih/core
/export/home/gireesh/core
/export/home/kunhi/core
/export/home/jaison/core
/export/home/mhassan/core





Wednesday, November 20, 2013

NcFTP Client for copying files to remote location



http://www.ncftp.com/ncftp/

Download ncftp client

# vi xyz.sh

 cd /ncftp-3.2.4/bin

./ncftpput -DD -u admin -p xyz123 192.0.0.120 /Archivelog1 /ora_temp/archive1/*.dbf


Username:  admin
Password:  xyz123
Remotely Location IP: 192.0.0.120
Remotely Folder: Archivelog1
host Location Folder: /ora_temp/archive1




Tuesday, November 5, 2013

Unix Info about Processor & Core



number of physical cpu: "psrinfo -p"
number of cores: "kstat cpu_info|grep core_id|sort -u|wc -l"
number of threads: "psrinfo -pv"

Number of Physical CPU


# psrinfo -p

2

Number of Cores:

 # kstat cpu_info|grep core_id|sort -u|wc -l

  2

Number of threads:

 # psrinfo -pv

The physical processor has 1 virtual processor (0)
UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x34 clock 1503 MHz)
The physical processor has 1 virtual processor (1)
UltraSPARC-IIIi (portid 1 impl 0x16 ver 0x34 clock 1503 MHz)





Wednesday, July 10, 2013

Netbackup install files that end with 1of2 or 2of2



On Windows System:

C:\Users\test\Desktop\netbackup7.5>copy /b "NetBackup_7.5_Win_zip.1of2"

+ "NetBackup_7.5_Win_zip.2of2" "windowsclient7.5"


NetBackup_7.5_Win_zip.1of2
NetBackup_7.5_Win_zip.2of2
        1 file(s) copied.





 On UNIX systems:
   

# cat "NetBackup_7.5_CLIENTS_tar-gz.1of3" "NetBackup_7.5_CLIENTS_tar-gz.2of3"

"NetBackup_7.5_CLIENTS_tar-gz.3of3" > "NetBackup_7.5_CLIENTS.tar.gz"

Sunday, June 30, 2013

Find a Large files in Solaris 10






# find /ssaerp/bse/tmp -type f -size +2000000k



/ssaerp/bse/tmp/tmp037818494
/ssaerp/bse/tmp/tmp058108092
/ssaerp/bse/tmp/tmp066170195
/ssaerp/bse/tmp/tmp014385733




# du -h /ssaerp/bse/tmp/tmp037818494
 1.1G   /ssaerp/bse/tmp/tmp037818494



# rm   /ssaerp/bse/tmp/tmp037818494

Sunday, March 31, 2013

Shared CDROM for Installation Software



Solaris 10

Server1

# ps -ef  | grep mountd

# share -F nfs -o ro /cdrom/cdrom0


Server2

# mkdir cd1

# mount server1:/cdrom/65_dvd1_90093333 /cd1

# cd cd1

# pwd

Saturday, March 23, 2013

Enable Solaris 10 Services





 Enable SSH root login in Solaris 10


1. Change the file /etc/ssh/sshd_config with
 PermitRootLogin yes to replace  PermitRootLogin no
2. restart the services
# svcadm restart svc:/network/ssh:default


 Enable FTP root login in Solaris 10

1. Go to /etc/ftpd
# vi ftpusers    (Remove the root user name in list)


 Enable TELNET root login in Solaris 10

1. Go to /etc/default
# vi login 
(comment out the CONSOLE=/dev/console line by putting a hash before it and you will be all  done)

# CONSOLE=/dev/console

Jump Start Server Configuration Solaris 10




Step1.

Solaris 10 boot & installation image on local disk.

# mkdir -p /export/home/jumpstart
# cd /cdrom/cdrom0/s0/Solaris_10/Tools
# ./setup_install_server /export/home/jumpstart


Step2.

Sysidcfg file keeps the various type of system information such as time zone and etc.

# mkdir -p /export/home/config

# vi sysidcfg

network_interface=primary
{protolcol-ipv6=no netmask=255.255.255.0} sec ty_policy=none name
service=none
time zone=US/Mountain
system_locale=en_us


Step3

Create directory to hold the rules file.

# mkdir /export/home/config
# vi rules

hostname afi-ssaerp - profile1 -


Step4

# /mkdir -p /export/home/config
# vi profile1
install_type inital_install
system_type standalone
cluster       SUNWCXall
partitioning explicit
filesys c1t0d0s0 2000 /
          c1t0d0s1 1024 swap


Step5.

#cd  /cdrom/cdrom0/s0/Solaris_10/Misc/JumpStart_sample

#cp check /export/home/config
# cd /export/home/config

# ./check



Step6.

Add a host entry
# /etc/ethers

0:3:ba:5a:cf:51 afi-ssaerp


# vi /etc/hosts

192.0.0.25  afi-ssaerp


Step7
Add a client

# cd /cdrom/cdrom0/s0/Solaris_10/Tools

# ./add_install_client -e 0:3:ba:5a:cf:51 -c solaris-ad:/export/home/config -p /solaris-ad:/export/home/config \
afi-ssaerp sun4u


Step8

# /etc/dfs/dfstab

# vi /etc/dfs/dfstab

share -F nfs -o ro, anon=0 /export/home/config



Step9

Booting the JumpStart Client
# init 0

ok boot net -vV





Sunday, October 14, 2012

How to enable Xmanager remote access SUSE Linux 10





You can enable the remote login as following steps.



1. vi /etc/X11/xdm/Xaccess

Remove the below comment symbol of following line.

#any host can get a login windows



 2. vi /etc/X11/xdm-config

comment out this line using the exclamation mark as following.


!DisplayManager.requestPort:    0


3. vi /etc/sysconfig/displaymanager

Change the first parameter to yes and the second parameter to yes in need.

DISPLAYMANAGER_REMOTE_ACCESS="yes"

DISPLAYMANAGER_ROOT_LOGIN_REMOTE="yes"



4. restart the xdm daemon

/usr/sbin/rcxdm restart






Tuesday, June 5, 2012

Unix Script for Copy Files to another Directory




root@test-server # cat mvfile.sh


SRCE_DIR=${HOME}/oradat/ssdb/archive1
DEST_DIR=${HOME}/backup/archive1

cd ${SRCE_DIR}

for FILE in `ls -1A *.dbf`
do

  if [ ! -f ${DEST_DIR}/${FILE} ]
  then
    echo 'Transferring file: '${FILE}
    cp "${FILE}" "${DEST_DIR}/${FILE}"
   
echo 'Transfer completed.'
  else
    echo 'The file: '${FILE}' already exists in '${DEST_DIR}'.'
  fi
done
root@test-server #