so part of my job is to create there backup diretories and place files in them.
when i mv or cp files over i have to user the cp - p to preserve the timestamp/
any how i am starting to script this whole thing and just want to verify that they directories were made .
I want to verify the full path of the new directory. I figured that the find command will give me the full path of the directory.
i tried the find command to display the path but it resulted i all sorts of nonsense it seemed to list every directory that it searches and if It cant get to that directory it
flashed a permissions denied.
[casper@casper2013Oct09]$ for i in broker1 broker2 Energy external1 external2 trader1 trader2 ;
find / -type d -name "/production/archive/2013Oct09/production/web/docs/$i/docs/etc/etc_html" ;
if i do a ls -lrtr i just get the contents of the file ls does not print the full path of the new directory.
[icapfo@usprvauth01s 2013Oct09]$ for i in ps-broker1 ps-broker2 ps-Energy ps-external1 ps-external2 ps-trader1 ps-trader2 ;
ls -ltr /production/archive/2013Oct09/production/web/docs/$i/docs/etc/etc_html ;
this i what i get when i run the ls -ltr before i create the directories which funny enough - it just what I want a printer list of the full path.
[icapfo@usprvauth01s 2013Oct09]$ for i in ps-broker1 ps-broker2 ps-Energy ps-external1 ps-external2 ps-trader1 ps-trader2
> ls -ltr /production/archive/2013Oct09/TT29282/production/web/docs/$i/docs/etc/
ls: /production/archive/2013Oct09/TT29282/production/web/docs/ps-broker1/docs/etc/: No such file or directory
ls: /production/archive/2013Oct09/TT29282/production/web/docs/ps-broker2/docs/etc/: No such file or directory
ls: /production/archive/2013Oct09/TT29282/production/web/docs/ps-Energy/docs/etc/: No such file or directory
ls: /production/archive/2013Oct09/TT29282/production/web/docs/ps-external1/docs/etc/: No such file or directory
ls: /production/archive/2013Oct09/TT29282/production/web/docs/ps-external2/docs/etc/: No such file or directory
ls: /production/archive/2013Oct09/TT29282/production/web/docs/ps-trader1/docs/etc/: No such file or directory
ls: /production/archive/2013Oct09/TT29282/production/web/docs/ps-trader2/docs/etc/: No such file or directory
That I what I want I want a test where I can view the whole path.
Is there a command that can do this?