WinSCP: Text search on remote files - search

I use WinSCP to get access on the remote files of our project. How can I search for some text/words in all remote files/directories using WinSCP?

WinSCP does not support text searching in its primary GUI.
But there's a built-in extension to Search recursively for text in remote directory.
This is a universal solution that works with SFTP, even if the server does not allow shell access, or even for FTP or WebDAV sessions.
Alternatively, you may be able to make use of WinSCP console window (Commands > Open Terminal) to launch the search from the command-line.
grep -r "text_to_search_for" *
This of course requires a shell access to the server.

Related

How to edit remote files (on a guest machine in vagrant) using an editor installed on the host?

I use vagrant in windows and work with linux boxes, sometimes i need to edit a file that is not in the shared vagrant folder, like apache2 config files. I don't like using a command line editor like nano or vim.
If you really need to use your own IDE(like PHPstorm) you may connect via sftp by setting it up on your on your IDE, pointing to the root directory('/'). You should also check if the user is connecting to have the right access to the file, much better if you can allow 'root' to connect remotely to your vagrant box.

Inatalling Flash Player in Linux via a ssh session

I have download and extracted 64 bit install_flash_player_11_linux.x86_64.tar.gz Adobe Flash Player via a ssh session (wget command). Now the package states that "Copy the libflashplayer.so file to the plugins folder of your browser."
It states that default it should be /usr/lib/firefox/plugins, but:
# ls -l /usr/lib/firefox/plugins
ls: cannot access /usr/lib/firefox/plugins: No such file or directory
I would be an using a X Windows Client for same - so where should I copy /opt/libflashplayer.so shared library?
To give an insight I am installing Weave - the app would actually run on a browser on a client box expect that deployment is completely done in Linux box - so is it that I need to install /opt/libflashplayer.so
It looks to me like the plugin directory might actually be at
/usr/lib/mozilla/plugins
However, I would maybe recommend installing it to the home plugins folder at
~/.mozilla/plugins
Reference: Determining plugin directory on Linux

Is there a way to enable auto-complete for files in user PATH under Windows cmd?

The tab-autocomplete feature in Windows is mostly like what is under Linux, but as far as I tried, it will not search my user PATH, so the files can be auto-completed has to be in the current directory.
Is there a way to enable Windows cmd to search not just the current directory but all user or system PATH?
Thanks!

Editing GVFS mounted files using Emacs

When I'm working with remote files (over SSH/SFTP), Emacs always saves the files with permission 700, but any other editor (e.g. GEdit) maintains the previous permission of 770.
Is there any way to configure Emacs such that it does not change the file permissions?
So here's something that may help. The bug I linked to describes your situation almost to a tee (substituting vim for emacs). Someone there posted a workaround you could try:
...after installing sshfs (fuse was already installed), then mounting
the remote server by creating /mnt/servername, and using sshfs
user#servername:/path/ /mnt/servername/ -p port, I was able to use
gvfs to navigate to /mnt/servername and open, edit and save the file
using GVim without problems. This is both a workaround, and perhaps
useful in narrowing down the problem.
Of course, the easiest (and quickest) solution will be to use Tramp Mode:
C-x C-f /user#10.10.1.10:/var/www/test.php

vim ftp auto upload

I am learning VIM. I have a local project, and I want to keep it synchronized on FTP server. So I need:
turning automated sync on, when i edit files localy
turning it off
forcing to uploading one file (useful when automatic sync off)
forcing to download one file
way to compare local and FTP version of a file
I use those features all the time with PHPStorm IDE, and now I wonder is it possible at all in VIM.
I was thinking... maybe to use external rsync app or svn, and sync svn with ftp. Is that more like the way to go?
You can install this plugin which allow you to open a remote file with
:e ftp:www.foobax.com/myfile.txt
and save it locally
:w myfile.txt
(use w! to overwrite it)
You could diff it using the diffsplit command. Example (on the window containing the remote file)
:diffsplit myfile.txt
Obviously, if you can use a VCS, that's even better.

Resources