Bug 11846

Summary: ln help for option -T ("2nd arg must be a DIR") is misleading
Product: Busybox Reporter: John Hammond <jhammond>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.30.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description John Hammond 2019-05-06 20:09:05 UTC
The -T option for ln seems to be based on the -T option from GNU coreutils ln. But the help text for -T misleadingly describes it as the opposite:

/ # ln --help
BusyBox v1.30.1 (2019-04-02 04:31:11 UTC) multi-call binary.

Usage: ln [OPTIONS] TARGET... LINK|DIR

Create a link LINK or DIR/TARGET to the specified TARGET(s)

	-s	Make symlinks instead of hardlinks
	-f	Remove existing destinations
	-n	Don't dereference symlinks - treat like normal file
	-b	Make a backup of the target (if exists) before link operation
	-S suf	Use suffix instead of ~ when making backup files
	-T	2nd arg must be a DIR
	-v	Verbose
/ # rm -f f0 f1
/ # touch f0
/ # ln -T /f0 /f1
/ # ln -T /f0 /tmp/
ln: '/tmp/' is a directory
/ # ln -T /f0 /tmp/f1

I suggest copying the help from GNU coreutils "-T     treat LINK as a normal file always".
Comment 1 Denys Vlasenko 2019-05-09 14:30:00 UTC
Fixed in git