Hello everyone,
I'm having a problem with a file. I can run any command on it : cp, mv, chmod,ln,more...
Thanks for your help
Hello everyone,
I'm having a problem with a file. I can run any command on it : cp, mv, chmod,ln,more...
Thanks for your help
If you ls -l $file
, do you have permission to change it?
Assuming you can see the file with "ls", please post:
ls -lisad filename
Are you logged in as "root"?
the permission of my file are -rw-r--r-- and i'm logged as root.
Any ideas ?
thanks for you help
show us those output:
id
ls -lisa file
cp file file.ORIG
Just in case the filename contains funny characters, try looking at the directory with:
ls -lab
hello,
ls -lisa => 407782 2064 -rw-r--r-- 1 xxx xxx 1045436 Mar 13 14:25
id => uid=0(root) gid=0(root)
cp file file.ORIG => cp: cannot access ....
Hmm filename seems to be missing.
What's the equivalent output from:
ls -lisa
ls -lisab
ls -lisa|sed -n l
Posted one above the other so we can see if the columns line up.
I suppose you could have a filename consisting of one or more space characters or control codes.
Is it a local directory or NFS mounted?
The filename is SystemOut_12.03.13_15.00.42.log
It's a local directory
What is the output of:
ls -ld directory
ls -l directory/SystemOut_12.03.13_15.00.42.log
Can you cd to the directory?
Yes i can cd to the directory and manipulate the others file on that directory. Only this file who has problem
In addition to the directory listings requested above, what is the output from:
fuser SystemOut_12.03.13_15.00.42.log
The directory listings are important if only to prove that the file has the name you think it has. Also it will tell us if the timestamp is changing because something is still writing to the file.
Also, when you get a command which does not work, do you get an error message or is it a problem with what the command did?
You are right. There is a process still writing on this file. But i used to manipulate the file even if it was used by that process.