jasay.blogg.se

Sublime text sftp locks up login
Sublime text sftp locks up login













(3) or doing that at kernel level, probably by using a filesystem that has some kind of long term memory (a versioning filesystem). (1) don't do that, unless the replacement command is ready to accept exactly all the flags and corner conditions that rm manage. Learn to do it often, and double check all your commands.

sublime text sftp locks up login

These are out of scope to the "protection" of your alias or even the rm binary substitution.Įven a simple mv, cp, or > file can destroy a file outside your safety net. and I bet the SFTP server will do the same. Will directly call unlink, as you can see by using strace on it: strace find. Many programs will just use the system call, completely bypassing your safety nets.įor example, the command find. The rm command is a (complex) shell around the unlink() family of system calls - see it as the linux kernel service that disposes of files(2). Rationale: you should know what are you doing using rm thinking that there is a safety net (with an alias, a global change in the executable(1), other things) will make you grow confident and you will make big mistakes when the safety net for whatever reason is not present - that can be an update, another system, or whatever. But let me chime in with my personal suggestion: do not do that. Use the do-it-yourself approach with mv as suggested by Depending on how exactly you change its behavior, it might be fine, but it might break.Īll the proposed answered will work for your command line experience.

sublime text sftp locks up login

Now, any files you delete with rm will be placed in ~/.local/share/Trash/files/. Install something like trash-cli as already suggested and then make rm an alias to it: alias rm='trash-put' So, for example, to have rm prompt you before each deletion, add this line to ~/.bashrc and ~/.profile`: alias rm='rm -i' I prompt once before removing more than three files, or when You can use either, depending on the level of annoyance protection you want: -i prompt before every removal So, that said, here are a few aliases you could use:Īs explained in man rm, these two flags protect you from inadvertently deleting files. The delete command in an FTP session is something completely different and will not be affected. Basically, if you don't know what I'm talking about, just use ~/.bashrc. bashrc so that son't be necessary unless you've changed it yourself. For ssh sessions, you would normally need to add it to your. You can, however, add an alias to rm, changing its behavior, to your ~/.bashrc.

sublime text sftp locks up login

You will have to limit yourself to protecting yourself from rm. Many programs call rm internally so if you change how that behaves they wont' work and this can have unexpected consequences. First of all, you don't want to change the behavior of rm globally.















Sublime text sftp locks up login