07-07-2011
Thank you Aia for ur answer.
I would like to copy the media sub directory with Lst_feb file without audio and video sub directory, like the picture. This is the only difficult part of code.
Are there any command to cp directory only with file/files without subdirectories ?
Thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
fjalkdsjfkldsajflkajdskl (3 Replies)
Discussion started by: pmeesara
3 Replies
2. UNIX and Linux Applications
HI all, I got a CPIO archive that contains a unix filesystem that I try to extract, but it extract to the root dir / unstead of current dir, and happily it detects my file are newer otherwise it would have overwrited my system's file!
I tried all these commands
cpio -i --make-directories <... (2 Replies)
Discussion started by: nekkro-kvlt
2 Replies
3. Shell Programming and Scripting
Greetings!
I have multiple files, one per subdirectory, all with the same file name. All subdirectories are one level deep from the main directory.
The data in the files is tab delimited between fields and record delimited with a newline.
The subdirectory names have the date in the... (5 Replies)
Discussion started by: vtischuk@yahoo.
5 Replies
4. Shell Programming and Scripting
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies
5. Shell Programming and Scripting
Hi,
I have one dir which has N subdirs.For ex:
/home/user/Project_Src
/home/user/Project_Src/Dir_A
/home/user/Project_Src/Dir_A/subdir/sub_dir2
/home/user/Project_Src/Dir_A/subdir/sub_dir3
/home/user/Project_Src/Dir_B
/home/user/Project_Src/Dir_B/Build
i want to create a folder with... (2 Replies)
Discussion started by: dragon.1431
2 Replies
6. UNIX for Dummies Questions & Answers
I am very new to unix as well as shell scripting.
I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file
Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies
7. Shell Programming and Scripting
Dear Members,
I have a list of xml files like
abc.xml.table
prq.xml.table
...
..
.
in a txt file.
Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file.
Please help me with the script or command to do so.
... (11 Replies)
Discussion started by: Yoodit
11 Replies
8. Emergency UNIX and Linux Support
du -hs command calculates the space for all the subdirs under a dir ...but it is very slow if the dir is huge....is there any quick way ...I am using Sun OS.
Thanks,
Ajay (19 Replies)
Discussion started by: ajaypatil_am
19 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I would like to list all files, older than 7 days, in a directory, but exclude all subdirectories in the find command. If I use find . -type f -mtime +7 all files in the subdirs are also included. How can I exclude them?
Regards,
JW (6 Replies)
Discussion started by: jwbijl
6 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
CP(1) General Commands Manual CP(1)
NAME
cp - copy
SYNOPSIS
cp [ -ip ] file1 file2
cp [ -ipr ] file ... directory
DESCRIPTION
File1 is copied onto file2. By default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source
file modified by the current umask(2) is used. The -p option causes cp to attempt to preserve (duplicate) in its copies the modification
times and modes of the source files, ignoring the present umask.
In the second form, one or more files are copied into the directory with their original file-names.
Cp refuses to copy a file onto itself.
If the -i option is specified, cp will prompt the user with the name of the file whenever the copy will cause an old file to be overwrit-
ten. An answer of 'y' will cause cp to continue. Any other answer will prevent it from overwriting the file.
If the -r option is specified and any of the source files are directories, cp copies each subtree rooted at that name; in this case the
destination must be a directory.
SEE ALSO
cat(1), mv(1), rcp(1C)
4th Berkeley Distribution June 8, 1985 CP(1)