When trying to copy a file in Solaris 8 it doesnt copy file or give a error. This worked 100% until the 29th. I've checked the rights and everything seems fine:
drwxrwxrwx 2 bmuser bmgroup 11776 Jan 3 10:32 spool
This is the file I want to copy:
-rwxrwxrwx 1 bmuser bmgroup 390474 Jan 3 10:32 lst01d.dat
I excecute the command like this:
/bmunix/data/branch00/spool>cp /bmunix/data/branch00/spool/lst01d.dat /bmunix/data/branch00/spool/solstc.dat
/bmunix/data/branch00/spool>ls -l sol*
sol*: No such file or directory
/bmunix/data/branch00/spool>
Am I maybe doing something wrong?
What else can I check for?
This happens to any file in the directory I try to copy.
grial
2
could it be a space issue?
df -k .
Space looks fine:
/bmunix>df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 6410583 1343170 5003308 22% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
swap 881920 0 881920 0% /var/run
swap 882240 320 881920 1% /tmp
/dev/dsk/c0t2d0s7 8705501 2472601 6145845 29% /bmunix
/dev/dsk/c0t0d0s7 1750028 9 1697519 1% /export/home
df -i doesn't seem to work
/bmunix>df -i
df: unknown option: i
Usage: df [-F FSType] [-abegklntVv] [-o FSType-specific_options] [directory | block_device | resource]
try to see files using
ls -l sol\*
grial
7
Yes, I'm sorry:
df -e
Try also an "echo $?" just after the cp command.
/bmunix/data/branch00/spool>ls -l sol\*
sol*: No such file or directory
/bmunix/data/branch00/spool>df -e
Filesystem ifree
/dev/dsk/c0t0d0s0 737732
/proc 936
fd 0
mnttab 0
swap 54499
swap 54499
/dev/dsk/c0t2d0s7 1038093
/dev/dsk/c0t0d0s7 427388
/bmunix/data/branch00/spool>cp /bmunix/data/branch00/spool/lst01d.dat /bmunix/data/branch00/spool/solstc.dat
/bmunix/data/branch00/spool>echo $
$
grial
10
Seems OK...
What about:
/bmunix/data/branch00/spool>cp /bmunix/data/branch00/spool/lst01d.dat /bmunix/data/branch00/spool/solstc.dat
/bmunix/data/branch00/spool>echo $?
Is there any continuous clean-up process cleaning the files on a specific directory? Could you please check that.
If that is the case, what ever be the number of times you copy the file, that wont be available.
/bmunix/data/branch00/spool>cp /bmunix/data/branch00/spool/lst01d.dat /bmunix/da
ta/branch00/spool/solstc.dat
/bmunix/data/branch00/spool>echo $?
0
/bmunix/data/branch00/spool>
Anything in particular I should look for?
grial
14
mmmm...
/bmunix/data/branch00/spool> find . -name 'sol*' -ls

That should cleanup scripts/process 
/bmunix/data/branch00/spool>cp /bmunix/data/branch00/spool/lst01d.dat /bmunix/data/branch00/spool/solstc.dat
/bmunix/data/branch00/spool>echo $?
0
/bmunix/data/branch00/spool>find . -name 'sol*' -ls
/bmunix/data/branch00/spool>
Nothing.
Can't find any clean up scripts as well.
first check whether the folder has any attributes set among using getfacl , lsattr, or the owner of the file
this case generally observed when we are working with temp group using the newgrp command
the file create under this may not work properly, kindly check it
/bmunix/data/branch00>getfacl -d spool
# file: spool
# owner: bmuser
# group: bmgroup
/bmunix/data/branch00>getfacl -a spool
# file: spool
# owner: bmuser
# group: bmgroup
user::rwx
group::rwx #effective:rwx
mask:rwx
other:rwx
/bmunix/data/branch00>
do one thing try to use dd command to check whether is redirecting or not
dd if=/file of=/file bs=4
or
it its working then the problem with cp binary
/bmunix/data/branch00/spool>ls sol*
sol*: No such file or directory
/bmunix/data/branch00/spool>cp lst01d.dat solstc.dat
/bmunix/data/branch00/spool>ls sol
sol: No such file or directory
/bmunix/data/branch00/spool>dd if=lst01d.dat of=solstc.dat bs=4
97618+1 records in
97618+1 records out
/bmunix/data/branch00/spool>ls solstc.dat
solstc.dat
/bmunix/data/branch00/spool>
/bmunix/data/branch00/spool>rm solstc.dat
/bmunix/data/branch00/spool>cat lst01d.dat > solstc.dat
/bmunix/data/branch00/spool>ls -l solstc.dat
-rw-r--r-- 1 bmuser bmgroup 390474 Jan 4 08:44 solstc.dat
/bmunix/data/branch00/spool>
It creates the file using the two commands you jyst gave me, but cp doesn't work.