I may miss something but the following is the nearest thing to directory "copy" i would like to have from shell:
Objective having the directory itssef & all it subdirs & files keeping their datestamp
How? add some option? Have "clone all" working that way?
The following command works indeed sometimes as "wantted" , here for the directory AGuid_
0.Stock:Backup_Datas/Gui4Cli/GuiCreator> list Aguid_#?
AGuid_ Dir ----rwed 15-Dec-11 11:57:26
1 directory - 2 blocks used
0.Stock:Backup_Datas/Gui4Cli/GuiCreator> copy clone all aGuid#? ram: // copies correctly the dir AGuid_
if there is n other file or dir starting with aGuid# you will also copy those of course
0.Stock:Backup_Datas/Gui4Cli/GuiCreator> copy clone all aGuid_#? ram: // copies only the files in AGuid_
But here it won't work:
0.Stock:Backup_Datas> list graphic#?
Graphics Dir ----rwed 09-Jan-15 16:01:12
1 directory - 2 blocks used
10.Stock:Backup_Datas> copy clone all graphic# ram:
COPY: bad template
copying a directrory "really clone" from shell
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: copying a directrory "really clone" from shell
You can't copy a directory AND its contents unless you start higher up, you have to have the destination already in place.
eg:
Copy all clone SYS:Devs/USB/#? to <destination>
or
Copy all clone SYS:Devs/USB/ to <destination>
will copy all the contents of USB/, not the USB drawer itself. If you want to copy the drawer as well, then:
MakeDir dest/USB
Copy all clone SYS:Devs/USB/ to dest/USB/
eg:
Copy all clone SYS:Devs/USB/#? to <destination>
or
Copy all clone SYS:Devs/USB/ to <destination>
will copy all the contents of USB/, not the USB drawer itself. If you want to copy the drawer as well, then:
MakeDir dest/USB
Copy all clone SYS:Devs/USB/ to dest/USB/
cheers
tony
tony
- thomasrapp
- Posts: 310
- Joined: Sat Jun 18, 2011 11:22 pm
Re: copying a directrory "really clone" from shell
tonyw wrote:You can't copy a directory AND its contents unless you start higher up, you have to have the destination already in place.
eg:
Copy all clone SYS:Devs/USB/#? to <destination>
or
Copy all clone SYS:Devs/USB/ to <destination>
will copy all the contents of USB/, not the USB drawer itself. If you want to copy the drawer as well, then:
MakeDir dest/USB
Copy all clone SYS:Devs/USB/ to dest/USB/
This is not true. You can copy source:xxx to dest:xxx without makedir dest:xxx before. Dest:xxx is created if it does not exist. Only if you copy to dest:xxx/yyy and dest:xxx does not exist, then you need makedir.
Re: copying a directrory "really clone" from shell
@thomas
thanks, i did miss that, works with 'clone all' as i wanted.
As I copied a number of directories in other ways that lost their datestamp,
is there some way to just "list" one directory with its datestamp (its content is not what i want)
(allowing me to select the datestamp & imposing it to the copied directory using setdate
)
thanks, i did miss that, works with 'clone all' as i wanted.
As I copied a number of directories in other ways that lost their datestamp,
is there some way to just "list" one directory with its datestamp (its content is not what i want)
(allowing me to select the datestamp & imposing it to the copied directory using setdate
)
- thomasrapp
- Posts: 310
- Joined: Sat Jun 18, 2011 11:22 pm
Re: copying a directrory "really clone" from shell
try "list (name)", for exampleJosDuchIt wrote:@thomas
thanks, i did miss that, works with 'clone all' as i wanted.
As I copied a number of directories in other ways that lost their datestamp,
is there some way to just "list" one directory with its datestamp (its content is not what i want)
(allowing me to select the datestamp & imposing it to the copied directory using setdate
)
list devs:(usb)
This makes it a wildcard, forcing directory scan, but matches only the one name.
Re: copying a directrory "really clone" from shell
@thomas
7.OS4.1FE:> list devs:(usb)
Directory "devs:USB" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
7.OS4.1FE:> list devs:usb/
Directory "devs:usb" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
7.OS4.1FE:>
7.OS4.1FE:> list devs:(usb)
Directory "devs:USB" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
7.OS4.1FE:> list devs:usb/
Directory "devs:usb" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
7.OS4.1FE:>
Re: copying a directrory "really clone" from shell
@thomas
7.OS4.1FE:> list devs:(usb)
Directory "devs:USB" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
7.OS4.1FE:> list devs:usb/
Directory "devs:usb" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
this is better
.OS4.1FE:> list devs:USB#? dirs
Directory "devs:" on Wednesday 04-Mar-15
USB Dir ----rwed 20-Jan-15 10:38:14
1 directory - 2 blocks used
unfortunately
.RAM Disk:> setdate ram:t 20-Jan-15 10:38:14
7.RAM Disk:> list ram:t#? dirs
Directory "ram:" on Wednesday 04-Mar-15
T Dir ----rwed 20-Jan-15 10:38:14
1 directory - 2 blocks used
no errror message but no effect either
7.OS4.1FE:> list devs:(usb)
Directory "devs:USB" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
7.OS4.1FE:> list devs:usb/
Directory "devs:usb" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
this is better
.OS4.1FE:> list devs:USB#? dirs
Directory "devs:" on Wednesday 04-Mar-15
USB Dir ----rwed 20-Jan-15 10:38:14
1 directory - 2 blocks used
unfortunately
.RAM Disk:> setdate ram:t 20-Jan-15 10:38:14
7.RAM Disk:> list ram:t#? dirs
Directory "ram:" on Wednesday 04-Mar-15
T Dir ----rwed 20-Jan-15 10:38:14
1 directory - 2 blocks used
no errror message but no effect either
- thomasrapp
- Posts: 310
- Joined: Sat Jun 18, 2011 11:22 pm
Re: copying a directrory "really clone" from shell
Which "effect" do you expect? You set date/time to 20-Jan-15 10:38:14 and the list command reflects exactly that. What else should happen?JosDuchIt wrote:unfortunately
.RAM Disk:> setdate ram:t 20-Jan-15 10:38:14
7.RAM Disk:> list ram:t#? dirs
Directory "ram:" on Wednesday 04-Mar-15
T Dir ----rwed 20-Jan-15 10:38:14
1 directory - 2 blocks used
no errror message but no effect either
This obviously is a bug. In OS3 it works as expected.JosDuchIt wrote:@thomas
7.OS4.1FE:> list devs:(usb)
Directory "devs:USB" on Wednesday 04-Mar-15
resource Dir ----rwed 20-Jan-15 10:38:14
hcd Dir ----rwed 20-Jan-15 10:38:14
fdclasses Dir ----rwed 20-Jan-15 10:38:14
fd Dir ----rwed 20-Jan-15 10:38:14
4 directories - 8 blocks used
Code: Select all
4> list (s)
S Dir ----rwed 15-Feb-15 21:29:04
1 directory - 2 blocks used
4> list (c|l)
C Dir ----rwed 19-Jan-15 21:41:05
L Dir ----rwed 22-Okt-14 20:33:53
2 directories - 4 blocks used
4>