08-04-2009
copying of files by userB, dir & files owned by userA
I am userB and have a dir
/temp1
This dir is owned by me.
How do I recursively copy files from another users's dir userA?
I need to preserve the original user who created files, original group information, original create date, mod date etc.
I tried
cp -pr /home/userA/* .
but it shows the files as being created by me.
So how do I do this?
Thanks in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
fjalkdsjfkldsajflkajdskl (3 Replies)
Discussion started by: pmeesara
3 Replies
2. Shell Programming and Scripting
Hello,
I'm new to shell scripting so I don't really understand what I'm doing wrong.
The script I'm trying to do saves all the files (*.c) on the current dir to a list and, one by one, copies them to a new one called Backup. The thing is, if there are already other versions of the files I'm... (6 Replies)
Discussion started by: G3nn
6 Replies
3. Shell Programming and Scripting
Hi Folks,
I have one curious case. There are list of following files placed in one directory such as... And updated each month.
files.JAN09.csv files.FEB09.csv files.MAR09.csv .....
Now, I need to move a specific files; i.e,
For this month, I need to move only OCT09, NOV09, DEC09,... (1 Reply)
Discussion started by: Jerald Nathan
1 Replies
4. Shell Programming and Scripting
Hello :)
can someone please help me with this task:
I am in the shell, in folder "Main"
below the folder Main are sub folders: "sourceA", "Source B", and "target"
in sourceA and source B are files, and in folder "Main" is a textfile, with filenames, one filename per line.
I need a... (4 Replies)
Discussion started by: Y-T
4 Replies
5. Red Hat
Hi all
I am trying to get this user db2s12 to be able to sudo as user sapr3 to run the sapr3 commands
I have tried so many options with my sudoers file but the single response I get is this :
password for db2s12:
H99A100:db2s12 53> sudo su - sapr3
password for db2s12:
Sorry, try... (3 Replies)
Discussion started by: hedkandi
3 Replies
6. Shell Programming and Scripting
I am trying to figure out a way to script copying specific files from one dir structure to another.
I have a dir structure like this:
dira/author 1/book 1/file a.epub
/book 2/file b.epub
/author 2/book 1/file c.epub
/author 3/book 1/file d.epub
/book 2/file... (2 Replies)
Discussion started by: arcanas
2 Replies
7. Shell Programming and Scripting
Hi ,
I'm trying to move/copy the files inside the loop into a directory .
I tried the below code and the issue is the data is not copying into the created directory but the files are copying into another file
file_path="/home/etc"
Last_Day=20130930
mkdir $file_path/ARC_${Last_Day}
... (3 Replies)
Discussion started by: smile689
3 Replies
8. Shell Programming and Scripting
I'm writing a Perl script which has its 1st step as to copy files from one directory to another directory. The Source directory has got files with extension, without extension, directories etc. But I want to copy ONLY files with no extension. The files with extensions and directories should not get... (2 Replies)
Discussion started by: jhamaks
2 Replies
9. Shell Programming and Scripting
I am searchingfor files owned by particular owner and group in a particular directory including its sub-directories. I use
find <dir> -user <user> -group <group> -exec ls -l {} \;
It does not work completely. In the sense is a subdirectory is owned by 'user' and group 'group' then all... (9 Replies)
Discussion started by: Soham
9 Replies
10. AIX
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies
LEARN ABOUT PLAN9
fc-cache
FC-CACHE(1) FC-CACHE(1)
NAME
fc-cache - build font information cache files
SYNOPSIS
fc-cache [ -EfrsvVh ] [ --error-on-no-fonts ] [ --force ] [ --really-force ] [ [ -y dir ] [ --sysroot dir ] ] [ --system-only ] [
--verbose ] [ --version ] [ --help ] [ dir... ]
DESCRIPTION
fc-cache scans the font directories on the system and builds font information cache files for applications using fontconfig for their font
handling.
If directory arguments are not given, fc-cache uses each directory in the current font configuration. Each directory is scanned for font
files readable by FreeType. A cache is created which contains properties of each font and the associated filename. This cache is used to
speed up application startup when using the fontconfig library.
Note that fc-cache must be executed once per architecture to generate font information customized for that architecture.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-E Raise an error if there are no fonts in dir or directories in the configuration if not given.
-f Force re-generation of apparently up-to-date cache files, overriding the timestamp checking.
-r Erase all existing cache files and rescan.
-s Only scan system-wide directories, omitting the places located in the user's home directory.
-v Display status information while busy.
-y Prepend dir to all paths for scanning.
-h Show summary of options.
-V Show version of the program and exit.
dir Directory to scan for fonts.
RETURN CODES
fc-cache returns zero if the caches successfully generated. otherwise non-zero.
FILES
%cachedir%/*-%arch%.cache-%version%
These files are generated by fc-cache and contain maps from file names to font properties. They are read by the fontconfig library
at application startup to locate appropriate fonts.
SEE ALSO
fc-cat(1) fc-list(1) fc-match(1) fc-pattern(1) fc-query(1) fc-scan(1)
The fontconfig user's guide, in HTML format: /usr/share/doc/fontconfig/fontconfig-user.html.
AUTHOR
This manual page was written by Keith Packard <keithp@keithp.com> and Josselin Mouette <joss@debian.org>.
Aug 13, 2008 FC-CACHE(1)