Sponsored Content
Full Discussion: copying file
Top Forums UNIX for Dummies Questions & Answers copying file Post 302110601 by johnf on Wednesday 14th of March 2007 03:50:56 AM
Old 03-14-2007
Only if read permissions are set on world access. If these are not set then NO. Its called security.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying a file

Can anyone help me with simple problem..... I am newie bee UNIX. I want to copy a file from drive A to /temp directory on drive C. How do i do that.? Thank you (14 Replies)
Discussion started by: jackpotp
14 Replies

2. Programming

copying a file

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)
Discussion started by: svh
2 Replies

3. Shell Programming and Scripting

copying the csv file into different worksheets of xls file

Hi, I have a script which will generate three csv files. i want to copy the contents of these csv files into a .XLS file but in different worksheets. Can a this be done in the same script? :confused: Can Perl come to my help in coping the csv files into different worksheets of .XLS file ?... (0 Replies)
Discussion started by: nimish
0 Replies

4. Filesystems, Disks and Memory

Strange difference in file size when copying LARGE file..

Hi, Im trying to take a database backup. one of the files is 26 GB. I am using cp -pr to create a backup copy of the database. after the copying is complete, if i do du -hrs on the folders i saw a difference of 2GB. The weird fact is that the BACKUP folder was 2 GB more than the original one! ... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

5. UNIX for Dummies Questions & Answers

Copying one file into another

I have two files, lets say file1.pun and file2.pun Now i need to copy the first 10 lines of file1.pun and paste them on the head of file2.pun without deleting the contents of file2.pun. I have to do this from command line only. Can u plz guide me in this regards (4 Replies)
Discussion started by: jasjot31
4 Replies

6. UNIX for Dummies Questions & Answers

Please, I need help with copying a file.

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)
Discussion started by: Eugene
3 Replies

7. Shell Programming and Scripting

Copying only the file name

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)
Discussion started by: Krishnaramjis
2 Replies

8. Shell Programming and Scripting

sed command for copying the contents of other file replacing it another file on specifc pattern

We have 2 file XML files - FILE1.XML and FILE2.xml - we need copy the contents of FILE1.XML and replace in FILE2.xml pattern "<assignedAttributeList></assignedAttributeList>" FILE1.XML 1. <itemList> 2. <item type="Manufactured"> 3. <resourceCode>431048</resourceCode> 4. ... (0 Replies)
Discussion started by: balrajg
0 Replies

9. UNIX for Dummies Questions & Answers

Help with searching for a file in a directory and copying the contents of that file in a new file

Hi guys, I am a newbie here :wall: I need a script that can search for a file in a directory and copy the contents of that file in a new file. Please help me. :confused: Thanks in advance~ (6 Replies)
Discussion started by: zel2zel
6 Replies

10. Shell Programming and Scripting

Copying a file to multiple other files using a text file as input

Hello, I have a file called COMPLIST as follows that contains 4 digit numbers.0002 0003 0010 0013 0015 0016 0022 0023 0024 0025 0027 0030 0031 0032 0033 0035 0038 0041 (3 Replies)
Discussion started by: sph90457
3 Replies
XATTR(7)						     Linux Programmer's Manual							  XATTR(7)

NAME
xattr - Extended attributes DESCRIPTION
Extended attributes are name:value pairs associated permanently with files and directories, similar to the environment strings associated with a process. An attribute may be defined or undefined. If it is defined, its value may be empty or non-empty. Extended attributes are extensions to the normal attributes which are associated with all inodes in the system (i.e., the stat(2) data). They are often used to provide additional functionality to a filesystem--for example, additional security features such as Access Control Lists (ACLs) may be implemented using extended attributes. Users with search access to a file or directory may use listxattr(2) to retrieve a list of attribute names defined for that file or direc- tory. Extended attributes are accessed as atomic objects. Reading (getxattr(2)) retrieves the whole value of an attribute and stores it in a buffer. Writing (setxattr(2)) replaces any previous value with the new value. Space consumed for extended attributes may be counted towards the disk quotas of the file owner and file group. Extended attribute namespaces Attribute names are null-terminated strings. The attribute name is always specified in the fully qualified namespace.attribute form, for example, user.mime_type, trusted.md5sum, system.posix_acl_access, or security.selinux. The namespace mechanism is used to define different classes of extended attributes. These different classes exist for several reasons; for example, the permissions and capabilities required for manipulating extended attributes of one namespace may differ to another. Currently, the security, system, trusted, and user extended attribute classes are defined as described below. Additional classes may be added in the future. Extended security attributes The security attribute namespace is used by kernel security modules, such as Security Enhanced Linux, and also to implement file capabili- ties (see capabilities(7)). Read and write access permissions to security attributes depend on the policy implemented for each security attribute by the security module. When no security module is loaded, all processes have read access to extended security attributes, and write access is limited to processes that have the CAP_SYS_ADMIN capability. Extended system attributes Extended system attributes are used by the kernel to store system objects such as Access Control Lists. Read and write access permissions to system attributes depend on the policy implemented for each system attribute implemented by filesystems in the kernel. Trusted extended attributes Trusted extended attributes are visible and accessible only to processes that have the CAP_SYS_ADMIN capability. Attributes in this class are used to implement mechanisms in user space (i.e., outside the kernel) which keep information in extended attributes to which ordinary processes should not have access. Extended user attributes Extended user attributes may be assigned to files and directories for storing arbitrary additional information such as the mime type, char- acter set or encoding of a file. The access permissions for user attributes are defined by the file permission bits: read permission is required to retrieve the attribute value, and writer permission is required to change it. The file permission bits of regular files and directories are interpreted differently from the file permission bits of special files and symbolic links. For regular files and directories the file permission bits define access to the file's contents, while for device special files they define access to the device described by the special file. The file permissions of symbolic links are not used in access checks. These differences would allow users to consume filesystem resources in a way not controllable by disk quotas for group or world writable special files and directories. For this reason, extended user attributes are allowed only for regular files and directories, and access to extended user attributes is restricted to the owner and to users with appropriate capabilities for directories with the sticky bit set (see the chmod(1) manual page for an explanation of the sticky bit). Filesystem differences The kernel and the filesystem may place limits on the maximum number and size of extended attributes that can be associated with a file. The VFS imposes limitations that an attribute names is limited to 255 bytes and an attribute value is limited to 64 kB. The list of attribute names that can be returned is also limited to 64 kB (see BUGS in listxattr(2)). Some filesystems, such as Reiserfs (and, historically, ext2 and ext3), require the filesystem to be mounted with the user_xattr mount option in order for extended user attributes to be used. In the current ext2, ext3, and ext4 filesystem implementations, the total bytes used by the names and values of all of a file's extended attributes must fit in a single filesystem block (1024, 2048 or 4096 bytes, depending on the block size specified when the filesystem was created). In the Btrfs, XFS, and Reiserfs filesystem implementations, there is no practical limit on the number of extended attributes associated with a file, and the algorithms used to store extended attribute information on disk are scalable. In the JFS, XFS, and Reiserfs filesystem implementations, the limit on bytes used in an EA value is the ceiling imposed by the VFS. In the Btrfs filesystem implementation, the total bytes used for the name, value, and implementation overhead bytes is limited to the filesystem nodesize value (16 kB by default). CONFORMING TO
Extended attributes are not specified in POSIX.1, but some other systems (e.g., the BSDs and Solaris) provide a similar feature. NOTES
Since the filesystems on which extended attributes are stored might also be used on architectures with a different byte order and machine word size, care should be taken to store attribute values in an architecture-independent format. This page was formerly named attr(5). SEE ALSO
getfattr(1), setfattr(1), getxattr(2), ioctl_iflags(2), listxattr(2), removexattr(2), setxattr(2), acl(5), capabilities(7) selinux(8) Linux 2018-04-30 XATTR(7)
All times are GMT -4. The time now is 10:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy