commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Useful, when you need to backup/copy/sync a folder over ssh with a non standard port number
If you need to xdebug a remote php application, which is behind a firewall, and you have an ssh daemon running on that machine. you can redirect port 9000 on that machine over to your local machine from which you run your xdebug client (I am using phpStorm)
So, run this command on your local machine and start your local xdebug client, to start debugging.
some times, after package upgrade (debian) or knetworkmanager crashing... NetworkManager turns off (disables). to enable it, use the above command.
Remove CR LF (CRLF) from a text file. use man:tr to get more info about removing other characters from a file. and even character to character replacements.
use the locate command to find files on the system and verify they exist (-e) then display each one in full details.
connect to a remote server using ftp protocol over FUSE file system, then rsync the remote folder to a local one and then unmount the remote ftp server (FUSE FS)
it can be divided to 3 different commands and you should have curlftpfs and rsync installed
this will connect to your hosted website service through the cPanel interface and use its backup tool to backup and download the entire website, locally.
(do not forget to replace : YourUsername , YourPassword and YourWebsiteUrl for it to work )