redirection and copying with same directory structure
Dear Experts,
How can I solve this problem ?
I want to redirect with having the same directory structure as in my input.
But my problem here is all the *.v files are processed but get stored in the same directory.
I want to preserve the directory structure when redirecting to out directory here.
Ex-
Input file is inside ./CSV/GSM/ad0_conv.v
then after running the above script
it should be ./out/CSV/GSM/ad0_conv.v
You certainly could use xargs but I think that second solution is a little overengineered.
If you are after a simpler commandline, try using the -exec option on find:
find ./CSV/ -name "*.v" -exec mkdir -p out/`dirname {}\;` -exec ./transform.sh {} > ./out/{} \;
(Untested)
Hi,
I need to write a script the has to copy the files from folders and subfolders to the same folder structure located in another location.
Ex:
mainfolder1
file1,file2,file3 subfolder1(file1,etc) subfolder2(file1,etc) to another folder location of same folder structure.
rsync is not... (7 Replies)
Hi All,
I want to copy the dir/subdir structure from SERVER-A to SERVER-B without copying all the files in each dir.
Is it possible using SCP / SFTP command?
For example,
SERVER-A has following two dir/subdirectories and files under each subdir.
... (1 Reply)
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)
Hello. I need help with copying part of a file structure to another directory while still keeping the structure. For example look below:
../folder1/sub1/txt.txt
../folder1/sub2/pic.png
../folder2/sub1/pic.png
../folder2/sub2/txt.txt
So in this I would like to copy only the directories and... (3 Replies)
Hello
I have three directory structures for code releases.
Each directory structure looks like this:
bash-3.00$ ls -R | more
.:
Test_Release_1
Test_Release_2
Test_Release_3
./Test_Release_1/dbcode:
rp_online_import_srdp.pkb-1
srdp_ar_validation.pkb-1... (1 Reply)
Hi...
I have a directory which has multiple directories and sub directories inside...
what command should i use to get a list of all these directories, without the filenames.... (2 Replies)
Hi,
I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Hi all
Is it possible to copy a structure of a directory only.
e.g.
I have a file with the following entries that is a result of a find :-
/dir1/dir2/file.dbf
/dir1/dir2/dir3/file1.dbf
/dir1/file.dbf
I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)