WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: bug: TinyCore, TinyCorePure64 v8.0, busybox 1.25.1 cp will not overwrite files  (Read 2663 times)

Offline cowboyenvy

  • Newbie
  • *
  • Posts: 17
OS: Tiny Core 8.0, TinyCorePure64 8.0
arch: x86 , x86_64
busybox: 1.25.1

error: cp will not overwrite a file

frugal install
usb boot
aterm:
bash:
busybox ash:

hardware:
acer aspire one aod255
dell latitude d531


cp -f test1 test2
cp -u test1 test2
cp test1 test2


cp -f test1 test2 ; cat test2
produces a prompt to overwrite?

I do not know if this is a specific issue to TinyCore 8.0, have not tested other platforms.
I am unaware of a currently tracked issue on this matter either after a perfunctory google search.

Offline cowboyenvy

  • Newbie
  • *
  • Posts: 17
just installed coreutils.tcz (GNU coreutils) 8.25
cp still executes busybox 1.25.1

/tmp/tcloop/coreutils/user/local/bin/cp still will not overwrite?

Please verify if you can reproduce?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Hi cowboyenvy
That behavior is probably being caused by the  alias definitions  in the  ~/.ashrc  file.

Offline cowboyenvy

  • Newbie
  • *
  • Posts: 17
Hi cowboyenvy
That behavior is probably being caused by the  alias definitions  in the  ~/.ashrc  file.


the failure to overwrite or not using the coreutils cp command?
I remove the alias, replaced /bin/cp with /tmp/tcloop/coreutils/usr/local/bin/cp
started a new ash shell, bash shell

cp is not gnu coreutils however I'm still not able to overwrite files with cp

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
If you use the busybox version of a command (cp, tar, wget) prior to loading the full fat extension, the busybox command will still be used after loading the extension.

You can get out of this by using "set +h" (in bash at least) or the full path to the command.

Offline cowboyenvy

  • Newbie
  • *
  • Posts: 17
*SIGH*

EBKAS (error between keyboard and seat)

I think I need to give up my project for a bit..

Offline cowboyenvy

  • Newbie
  • *
  • Posts: 17
so cp -f test1 test2 ; test

this was prompting for overwrite which got me upset, and then fundamentally pissed at the computer, and then "not seeing clearly" trough my frustration of not being able to do exactly what I wanted.

.ashrc alias='cp -i'
was my root cause but by the time the question was answered I was far to upset to see that.
time for a break.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
When I need to copy with overwrite I just use /bin/cp instead of cp. Then force will work because this bypasses the alias.
Force doesn't work with ln however. I have checked this on another busybox platform (ESXi) and it fails the same way. Must use rm first.