Monthly Archives: February 2013

How to mount a CD/DVD in linux

mount -t iso9660 -o ro /dev/cdrom /media/ mount -t iso9660 -o ro /dev/sr0 /media/

Posted in Linux | Tagged , | Leave a comment

Remove or replace all characters after character X

ls | sed -e ‘s/X.*//’    (remove) ls | sed -e ‘s/X.*/Y/’ (replace with Y)

Posted in Linux | Tagged , | Leave a comment

Create your own rpm from tar archive (basic steps)

1. yum install rpm-build 2. yum install redhat-rpm-config Create directories for RPM building under your home: 3.mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} 4.echo ‘%_topdir %(echo $HOME)/rpmbuild’ > ~/.rpmmacros (this will overwrite any existing .rpmmacros files!!!) 5. Copy the .specs file in ~/rpmbuild/SPECS 6. … Continue reading

Posted in Linux | Tagged | Leave a comment