POSIXly, the only things that are promised ("shall exist on conforming systems") are /
, /dev
, /tmp
, /dev/null
, /dev/tty
and /dev/console
, though not all may be writable (or even readable).
Depending on what you use to copy the files, all that is either really not helpful, or you could try to copy /dev/null
. scp
seems to give an error when trying to copy it, but if you use something that just reads the data and ignores the file being special, like cp /dev/null .
, you end up with a successfully copied zero-length regular file.
But if you try to copy it with something copies the device node, you probably can't create it on the local system without privileges, and I don't think there's any guarantee the device numbers are the same across systems, so if you can copy it, the result might be a device node that means something completely different on the local system.
The standard utilities are supposed to be in PATH
, so if you can parse that on the remote, you should be able to find e.g. sh
or ls
in some listed directory (though they might be symlinks). On a conforming system, you should also be able to find cd
, but Linuxes don't tend to have it, since it's pretty much useless as an external utility.
In practice, you'll probably find /bin/ls
or /bin/sh
in many systems (though they still might be symlinks). Maybe not on the most esoteric ones, but you probably know if you're dealing with those.
/etc/hosts
and/etc/passwd
, but I can't guarantee this so not providing a "proper" answer. See Is the Filesystem Hierarchy Standard a UNIX standard or a GNU/Linux standard?. – Chris Davies Apr 26 '18 at 22:04/etc/profile
? – jesse_b Apr 26 '18 at 22:29