Tag Info

Hot answers tagged

14

When you define an alias, the command you set is run instead of the one you wrote. This means that when you run ftp abc.com, what is actually executed is echo do not use ftp. Use sftp instead abc.com A simple solution is to use a function instead of an alias: ftp(){ echo 'do not use ftp. Use sftp instead'; } Alternatively, you could use printf as ...


14

alias ftp='echo do not use ftp. Use sftp instead. # '


8

Just put a space and the comment character # at the end of the alias string: alias ftp='echo do not use ftp. Use sftp instead. #' ftp abcd.com do not use ftp. Use sftp instead. This will cause the parameters to be treated as a comment. Just do not forget to add a space before # otherwise it will not be interpreted as a separate token after the alias ...


1

Sure you can use lsof to see what activity is currently taking place on the server. Here's what the output would look like for an idle connection to an SFTP server. $ sudo /usr/sbin/lsof -p $(pgrep sftp) COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sftp-serv 30268 sam cwd DIR 0,19 20480 28312529 /home/sam ...


1

Use PSFTP, which is part of PUTTY installation (PSFTP.EXE at the same folder). You just enter sftp <your_machine_ip> and then use standard ftp commands to copy/paste files between hosts (put <local_file> do upload, get <remote_file> to download, etc.). But if you want to connect to a shared drive, you probably need to use samba client ...



Only top voted, non community-wiki answers of a minimum length are eligible