I have a list of files along with their filepaths, that I'm planning to copy into a server. Is there a way, I could figure out before I copy, which filesystem it actually would go into? assuming the disks have been partitioned and mounted.
Asked
Active
Viewed 48 times
0
-
Do these file paths all contain directory paths that currently exist, or will some directories need to be created? Symlinks within those paths can make determining the ultimate location tricky until the directories are actually created. – Mark Plotnick Jun 19 '15 at 19:38
-
At least parts of it are created. example: I want to move file - /a/b/c/file.pl and there's a filepath or a mountpoint /a/b that already exists. So, I guess some directories need to be created. I can ensure none of the file paths are symbolic links. – madCode Jun 19 '15 at 19:47
1 Answers
0
df $(dirname/your/destination/directory/filename)
The basename is used in case the filename does not already exist. The directory should already exist. If it doesn't keep taking the basename until it does.
Robert Jacobs
- 415
- 2
- 9