Tagged Questions
8
votes
3answers
379 views
Flattening a nested directory
This is probably very simple, but I can't figure it out. I have a directory structure like this (dir2 is inside dir1):
/dir1
/dir2
|
--- file1
|
--- file2
What is ...
4
votes
2answers
755 views
Difference between cp -r and cp -a
Looking for the difference between cp -r and cp -a? What does recursive mean in terms of copying files from a folder?
7
votes
1answer
133 views
Strange behaviour in recursive copy
Could someone explain why this happens?
Most specifically:
Why is one 1's content copied to f?
And why is f copied to g?
$ tree
.
0 directories, 0 files
$ mkdir 1
$ mkdir 2
$ touch 1/a
$ touch ...
4
votes
3answers
858 views
recursively copy only images and preserve path
I'm working on a website migration. I have a scrape of the site, with all the files and directory structure as you would see them in the URL. I want to pull all images, maintaining the directory ...