some days ago someone asked me about annoying others with write command.
a simple way to do this is using the watch command :
watch "echo ha, ha, ha! | write USER"
in which USER stands for the victim's(!) user name.
for annoying all users you can write it this way:
watch " for i in `who | cut -f 1 -d ' ' | uniq`
do
echo ha, ha, ha! | write $i;
done
";
simple and obvious.
good luck!
and be nice!!
P.S.
an alternative is to use wall command
Friday, January 2, 2009
Tuesday, July 1, 2008
Changing Thumbnails in gnome
In Unix systems running gnome as their window manager there exists a directory named .thumbnails in every users home directory.
As it is apparent from the name it contains the pictures(thumbnails) of the files shown in nautilus file browser as a symbol for text files like .TXTs or PDFs or video files like .AVIs or .DAT or so.
We can make some changes on them to cause nautilus to make mistakes. for example make it show an apple as the thumbnail of a book! for doing so follow these steps:
1- first convert the picture of apple to a .PNG format and name it apple.png .
2- then find the current picture of the book in the directory ~/.thumbnails/normal/ ( it may be difficult! you may have many pictures there. I use nautilus to do it faster.)
3- suppose the name was something like x.png where x is a number in radix 16 . write this in terminal
$ touch --reference\=~/.thumbnails/normal/x.png apple.png
this is done to make the last-change time of your apple picture same as the main file.( when nautilus opens the containing directory of the book it checks to see if the last-change times of the thumbnail and the book are equall or not. if not, it reloads the thumbnail.)
4- change the file name and move it to the discussed directory.
$ mv apple.png ~/.thumbnails/normal/x.png
where x.png is the name found on step 3.
5- open the directory with nautilus and see the apple as the thumbnail of your book!
you can see the persian version of this trick here.
As it is apparent from the name it contains the pictures(thumbnails) of the files shown in nautilus file browser as a symbol for text files like .TXTs or PDFs or video files like .AVIs or .DAT or so.
We can make some changes on them to cause nautilus to make mistakes. for example make it show an apple as the thumbnail of a book! for doing so follow these steps:
1- first convert the picture of apple to a .PNG format and name it apple.png .
2- then find the current picture of the book in the directory ~/.thumbnails/normal/ ( it may be difficult! you may have many pictures there. I use nautilus to do it faster.)
3- suppose the name was something like x.png where x is a number in radix 16 . write this in terminal
$ touch --reference\=~/.thumbnails/normal/x.png apple.png
this is done to make the last-change time of your apple picture same as the main file.( when nautilus opens the containing directory of the book it checks to see if the last-change times of the thumbnail and the book are equall or not. if not, it reloads the thumbnail.)
4- change the file name and move it to the discussed directory.
$ mv apple.png ~/.thumbnails/normal/x.png
where x.png is the name found on step 3.
5- open the directory with nautilus and see the apple as the thumbnail of your book!
you can see the persian version of this trick here.
Monday, June 23, 2008
How to increase your page views in Yahoo 360
Some people care about increasing their page views in Yahoo 360 by any means. open source has brought a good solution for this.
for this article I suppose you have access to some Unix shells or something.
first of all go to your yahoo 360 setting and change the setting in order to enable accessing your profile via your ID that is:
360.yahoo.com/id
then open a terminal and write this line in it
wget 360.yahoo.com/id
wget is a downloading tool running with a wonderful Command Line Interface. by this you tell the shell that you want to download this site. and it downloads it for you. now go and see your page views. yes it has increased.
of course increasing 1 page view isn't desirable and we seek more! for this we need a for loop to put this wget in. here is how we do so.
create a file named 360.sh and open it with vi or any text editor you want and write this in it:
for(( i=0 ; i < 100; i++ ))
do
wget 360.yahoo.com/id
done
now save and close it and run it by
sh 360.sh
cheers. you are now increasing your page views by 100. but this approach doesn't differ from others so much. you must wait for it again and it is also bad because it downloads and saves lots of pages!
for the latter problem we use the -c option to tell it always try to get the page again. ( or --continue) and we use a -b option to tell it run in background.
and it becomes
for(( i=0 ; i < 100 ; i++ ))
do
wget -bc 360.yahoo.com/id
done
you need to put delays between these downloads by using sleep command.
and finally it becomes
for(( i=0 ; i < 100; i++ ))
do
wget -bc 360.yahoo.com/id
sleep 7s
done
save it and run it by using this command
sh 360.sh &
to run in background.
congratulations!
I used this with the university's shell and put 1000 instead of 100 in for loop.
so it is increasing while I am not connected to internet.
for this article I suppose you have access to some Unix shells or something.
first of all go to your yahoo 360 setting and change the setting in order to enable accessing your profile via your ID that is:
360.yahoo.com/id
then open a terminal and write this line in it
wget 360.yahoo.com/id
wget is a downloading tool running with a wonderful Command Line Interface. by this you tell the shell that you want to download this site. and it downloads it for you. now go and see your page views. yes it has increased.
of course increasing 1 page view isn't desirable and we seek more! for this we need a for loop to put this wget in. here is how we do so.
create a file named 360.sh and open it with vi or any text editor you want and write this in it:
for(( i=0 ; i < 100; i++ ))
do
wget 360.yahoo.com/id
done
now save and close it and run it by
sh 360.sh
cheers. you are now increasing your page views by 100. but this approach doesn't differ from others so much. you must wait for it again and it is also bad because it downloads and saves lots of pages!
for the latter problem we use the -c option to tell it always try to get the page again. ( or --continue) and we use a -b option to tell it run in background.
and it becomes
for(( i=0 ; i < 100 ; i++ ))
do
wget -bc 360.yahoo.com/
done
you need to put delays between these downloads by using sleep command.
and finally it becomes
for(( i=0 ; i < 100; i++ ))
do
wget -bc 360.yahoo.com/id
sleep 7s
done
save it and run it by using this command
sh 360.sh &
to run in background.
congratulations!
I used this with the university's shell and put 1000 instead of 100 in for loop.
so it is increasing while I am not connected to internet.
About The blog
This blog is intended to introduce you some tricks of the world of Linux and Unix systems.
Subscribe to:
Posts (Atom)