Remove line numbers from file (NOT lines)

Consider you have a file named t.txt which has below content.

root@localhost:/home/# cat t.txt
1 hjjhhjh3klk 5 ;k;lk;k
2 kjhjkhjkh656 iuyiuy2
3 jghjhghgjh

Notice the line numbers at the starting of each line.We will remove the line numbers but keep the lines intact.
It can be done by below command

root@localhost:/home/# sed -i s'/ *[0-9]* .//' t.txt

Above command will remove the line numbers.Here’s how the file looks after that.

root@localhost:/home/# cat t.txt
hjjhhjh3klk 5 ;k;lk;k
kjhjkhjkh656 iuyiuy2
jghjhghgjh

Linux – run vlcplayer as root

When you try to run vlcplayer as root you might encounter below message.

VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).


By using the trick below you should be able to run vlcplayer as root.(This was tested in Ubuntu 12.04.4 LTS)

sed -i 's/geteuid/getppid/g' /usr/bin/vlc

Now you should be able to run vlc with root.