Posts

Showing posts from April, 2013

A good way to list all file names (probably with whitespace) in bash

Typical find . bash command interprets a file with whitespace in name into multiple files. To avoid this problem, use the following construct,   find . - iname "foo*" | while read f do echo ${f} done   Reference     To eliminate leading ./ in the listed file names, change the code above to the following. find . - iname "foo*" | while read f do echo ${f#./} done Reference

apt-get under proxy server

1) Open the Terminal and type the following command       sudo gedit /etc/apt/apt.conf.d/02proxy Note : 01proxy file is not present earlier. 2) Type the following line(in red) in the file:      Acquire::http::Proxy “http://yourusername:yourpassword@yourproxy:yourport″;      Acquire::http::Proxy "http://foss:3189";     3) Save the file and your problem is solved. Reference

rpi dvd to iso in linux

Check where the CD is located in the Linux system > cdrdao scanbus Suppose you get the following which says it is at /dev/sr0 Cdrdao version 1.2.3 - (C) Andreas Mueller /dev/sr0 : Slimtype, DVDRW SOSW-833S , VRS3 Make sure that location is unmounted. > umount /dev/sr0 Do the following command to rip the dvd to iso. > cat /dev/sr0 > /home/tylau0/disc.iso