Re:What do Unix command names stand for?
by sverige on Friday June 15, 2018 @08:40PM
(#17324998)
I still pause to remember that I have to type 'if=' and 'of=' and 'bs=' instead of just remembering the order of arguments.
[ Parent
| on HN ]
Re:What do Unix command names stand for?
by code_duck on Saturday June 16, 2018 @05:20AM
(#17326704)
What always gets me is ssh, scp and sftp... having to specify oPort= for sftp compared to -p for ssh.
Re:What do Unix command names stand for?
by trinitry3 on Saturday June 16, 2018 @05:29AM
(#17326726)
You can use -P.
Re:What do Unix command names stand for?
by kasey_junk on Saturday June 16, 2018 @08:59AM
(#17327219)
Whoever made it -p in ssh & -P in scp can fuck right off.
The reason is that scp was designed as a secure replacement for rcp, which was designed as a remote version of cp. The flags -p and -r were inherited from cp by rcp (see https://linux.die.net/man/1/rcp), so for compatibility scp had to use the same flags.
As for ssh, I haven't looked at its history, but I suspect it's older than scp; the intuitive flag for "port" is -p, so that's what ssh used.
Good to know. I wonder if that's a recent improvement? Last time I was doing lots of sysadmin work was 2011.
I'd prefer ddrescue or just pv, just for the progress meter, and saner arguments.
Re:What do Unix command names stand for?
by dmartinez on Saturday June 16, 2018 @09:35AM
(#17327325)
`tldr`[0] can be helpful for quick references like this. I never worry about commands like `ssh` anymore because of this. This is the output for `dd`:
$ tldr dd
dd
Convert and copy a file.
- Make a bootable usb drive from an isohybrid file (such like archlinux-xxx .iso):
dd if=file.iso of=/dev/usb_drive
- Clone a drive to another drive with 4MB block and ignore error: dd if=/dev/source_drive of=/dev/dest_drive bs=4m conv=noerror
- Generate a file of 100 random bytes by using kernel random driver: dd if=/dev/urandom of=random_file bs=100 count=1
- Benchmark the write performance of a disk: dd if=/dev/zero of=file_1GB bs=1024 count=1000000
[0]: https://github.com/tldr-pages/tldr
Re:What do Unix command names stand for?
by I_complete_me on Sunday June 17, 2018 @10:18AM
(#17332453)
I've been using a similar command called 'cheat' [pip install cheat] which does more or less the same thing. I wonder which of the two is more comprehensive. How would I check this efficiently?