I needed to mirror an FTP site to linux, as preparation for of a migration. After looking for the most easy way to do this, I found ‘lftp’ on the linux side, and used that.
1 |
sudo lftp -e "set ftp:ssl-allow no; mirror -c -e --parallel=3 employees/ /srv/ftp/employees/" -u jeroen someftp.actualadmins.com |
In case you don’t have lftp, its easy to ‘apt-get install lftp’ if you’re… Read more »
The “find” command usually reports too much information, because
1 |
find "some_text" *.* |
also reports names of the files that do not contain the text. A useful oneliner to have at hand is to start a cmd.exe window in the right folder, and enter:
1 |
for %I in (*.*) do @(find /i "some_text" "%~I">NUL&&echo %I) |
If you need this to work recursive, use:… Read more »
I needed to replace text in multiple files on an Ubuntu server. The text was “D:/FTPdownloads”, and would be changed to “srv/ftp” (migrating an FTP server from Windows to Linux). Also this had to be done in 100+ files in a bunch of directories. Quickest way I found to do… Read more »