jareddreyer
8/28/2017 - 2:12 AM

Useful Unix Commands

Useful Unix Commands

# move from remote to local
$ rsync --progress -avr --rsh="ssh -p 3427" client@<serveraddress>:~/public_html/assets/ ./assets/

# move from local to remote
$ rsync --progress -avr --rsh="ssh -p 3427" ./assets/ client@<serveraddress>:~/public_html/assets/
# runs phpinfo and greps a word
$ php -i | grep libxml
//renew IP address in debian
$ sudo /etc/init.d/networking restart

//check IP address
$ ip addr
// delete a file
$ rm <filename>

//force delete all files
$ rm -rf <folder>

// delete a directory (and all contents)
$ rm -r <folder>

//rename/move a directory
$ mv <old_folder_name>/ <new_folder_name>/