Some basic linux hacks
#Sharing files on local server: sender:target dir$ python3 -m http.server port receiver$ wget -r sender_ip:port/{name of file or folder} Or sender:target dir$ tar -cz . | nc -q 10 -l -p 45454 receiver$ nc -w 10 $REMOTE_HOST 45454 | tar -xz #Pushing a local GIT repository to remote #Pulling a GIT remote repository: #To download an EDX course: 1. Download edx-dl from https://github.com/coursera-dl/edx-dl 2. Now browse to downloaded dir and type: sudo python setup.py install 3. Now authenticate (your credentials will be protected as per author of edx-dl): edx-dl -u chap.rishabhk173@gmail.com --list-courses 4. Now use link of one of the course links from output of previous command: edx-dl -u chap.rishabhk173@gmail.com link #To rename files in all subdir recursively changing name1 in filename to name2: find . -type f -exec rename 's/name1/name2/g' *.vtt '{}' \; #To rename files, appending it's parent
Comments
Post a Comment