'scp' Outside of Userspace

When performing for the first time a command such as scp ./src user@url:dir, one immediately learns that the directory after the colon is relative to "user's" home folder.

So one assumes that if you write scp ./src user@url:/dir, the string "/dir" will be concatenated to "user's" home directory path and therefore still refer to the contents of the home directory.

However this isn't the case; "/dir" will refer to "dir" at the file system's root.

So scp can be used to modify any part of a file system so long as the permissions are right.

Comments

Popular posts from this blog

Fix Controller Input when a Game Doesn't Use Steam Input

Fix Inability to Move Files to Trash in VSC

VSC Vanishing Go Imports