Facebook

Showing posts with label Command. Show all posts
Showing posts with label Command. Show all posts

Finding file and directory in ubuntu


To find a file in your system by name use below command -

find -name "query"

For case insensitive search -
find -iname "query"

Play a song as soon as someone comes online


Today we are going to create a very simple and small script which plays a song when someone starts their system i.e. as soon as they come online (Of-course you both should be in same network. i.e their system should be reachable form yours) .

So have you heard of ping command. Yes? Great. We will use this command only.

Unix is Fun


who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; fsck; more; yes; more; gasp; yes; uptime; umount; sleep






StopWatch and other Hacks




Say Yes to all confirmations


So sometimes it happens that you are installing some package or compiling some source code and it asks for your confirmation
Do you want to continue (y/n)?
 so instead of pressing 'y' everytime you just can do this

Let Linux speak for you


Now let your Linux speak for you.
 
There is a utility in linux called 'espeak' using which you can let it speak. Its more or less same as 'Narrator' in Windows.

Syntax is :

Download YouTube video in One Go




How to download single video - 


$ youtube-dl   is a very powerful utility in Linux to download videos from Youtube or other similar sites.


To download just one video use the below syntax


Few funny commands in Linux.



1. Did it ever happened to you that instead of typing 'ls' for listing the files in a directory , you type 'sl' in hurry and got the no-so-pleasant error saying that 

"The program 'sl' is currently not installed.  You can install it by typing:
sudo apt-get install sl


Have you ever tried what 'sl' is? No? ok then try it now. Install the 'sl' command by typing

Linux : How to copy/remove all files from a tree of directories.



Sometimes we face a situation when there are a huge or rather say a deep tree of directories. All these directories in turn contains directories and files and at the leaf node i.e. in the innermost directory there are some files.
Now you want to copy all files at one place or say you want to perform some action on all these or some selected files.

Few very dangerous commands in Linux



NOTE : DO NOT RUN these commands on your machine. Use friend's system. :)

So in Linux there are many simple, short and efficient commands which can be very harmful if are not used with precaution. 

1. sudo rm -rf /

 This command remove all the content from root(/) directory when hit enter after providing password. This is one reason our default working user is not root.


2. :(){ :|: & };: