Hello everyone,
I have tried copying a directory having a sticky bit set to another directory. The source directory was copied with the sticky bit but the contents (i.e: other files and directories) within the directory which another user had created changed ownership to show as i had created it.This is disturbing.
How can i copy files across directories and at the same time retain the original permissions including special permissions.The contents are within my home_dir.
command i used was :
NB: I managed to get away with it when i copied it using root.
Last edited by Scrutinizer; 01-17-2013 at 09:03 PM..
Reason: code tags
I am using AIX version 5.1
I would like to copy my log files to another directory and timestamp them or add the date to the file name so I can distinguish them apart and keep 4weeks of files in this directory.
so I usally do this
cp rptlog /dump/backup.log.files
I would like the the file... (5 Replies)
hello,
i have to copy a file from one directory to another directory in linux.
how to do this using a c function?
kindly ans to my query.
thanks (2 Replies)
hi group...
needed some help regarding this requirement
actually we have a set of zip files in a server
we have two types of zip files one as usual .zip extension and one with .zip_m extension... we need to copy the files from .zip_m extension to .zip extension with same file name ... it... (2 Replies)
Hello.
I don't know much about UNIX. Here is a problem I need to resolve.
There is a file "file1.txt". It contains the line "End Of Copy" somewhere in the middle. I need to copy file1.txt to another file, "file2.txt" until this line. So,
if the "file1.txt" is
Line 1
Line 2
Line 3... (3 Replies)
Hi
I just want to copy the file name from the input file. Below is the code I have used but the answer comes with quotation .
$ cat test.sh
file_name=\'$1\'
echo $file_name
$ sh test.sh grants.dat
'grants.dat'
How do I remove the quotation
Thanks (2 Replies)
trying to copy all the files without extension then add
"*.txt" but its not working is there any other way and i do not want to use
cpio -vdump just want to use copy command
FROM=/usr/share/doc
TO=/aleza/doc
#the follow function copies all the files without extensions
call(){
cd $FROM... (3 Replies)
hi all ,
i had a following problem in my script
filename=oas/data/output.txt
printf"content1" >> $filename
printf"content2" >> $filename
printf"content3" >> $filename
printf"content4" >> $filename
printf"content5" >> $filename
printf"content6" >> $filename
my contents are different... (6 Replies)
Discussion started by: hemanthsaikumar
6 Replies
LEARN ABOUT CENTOS
sticky
sticky(5) Standards, Environments, and Macros sticky(5)NAME
sticky - mark files for special treatment
DESCRIPTION
The sticky bit (file mode bit 01000, see chmod(2)) is used to indicate special treatment of certain files and directories. A directory for
which the sticky bit is set restricts deletion of files it contains. A file in a sticky directory can only be removed or renamed by a user
who has write permission on the directory, and either owns the file, owns the directory, has write permission on the file, or is a privi-
leged user. Setting the sticky bit is useful for directories such as /tmp, which must be publicly writable but should deny users permission
to arbitrarily delete or rename the files of others.
If the sticky bit is set on a regular file and no execute bits are set, the system's page cache will not be used to hold the file's data.
This bit is normally set on swap files of diskless clients so that accesses to these files do not flush more valuable data from the sys-
tem's cache. Moreover, by default such files are treated as swap files, whose inode modification times may not necessarily be correctly
recorded on permanent storage.
Any user may create a sticky directory. See chmod for details about modifying file modes.
SEE ALSO chmod(1), chmod(2), chown(2), mkdir(2), rename(2), unlink(2)BUGS
The mkdir(2) function will not create a directory with the sticky bit set.
SunOS 5.10 1 Aug 2002 sticky(5)