Skip to main content

Posts

Showing posts from December, 2011

shutdown

We may think that why to bother typing commands when using the GUI to shutting down the computer is easy and straight. But at time we may want to shut down the computer after some time when the download finishes or some other task completes. But we cannot wait until that time. So we can use shutdown command in such cases. For example, if you want to shut down the computer at 2:12 pm then you can use the following command in your ubuntu box: sudo shutdown -h 14:12 "Going to Shutdown at 2:12 pm"

Kile

Though the default installation of Kile, a latex editor, in ubuntu works fine for simple things, but at times it needs extra packages (for e.g. algorithm.sty, etc). In that case we can install the following extra scientific packages in Ubuntu linux as follows: sudo apt-get install texlive-science

Hide drive icon from your Ubuntu Desktop

It is useful when we wish to configure our desktop item to be stable. Sometimes its annoying when the drive icons appear and disappear when we mount and unmount them. So follow the following steps to get rid of this situation:    1. Hit Alt+F2 then the  "Run Application" window will apper.    2. Then type "gconf-editor" and press Enter  so as to get the Configuration Editor.    3. Browse to apps > nautilus > desktop.    4. Check off  "volumes_visible"  then you are done

Bash script to archive different files and folders into a single folder which will be named using current timestamp

I use this script to back up files that are created in different locations. I feel easy to collect all the related files and folders to compress and save them as a single zip archive which is named as per the current date and time. #!/bin/bash # this program creates a zip archive of myFolder(containing files and folders), file1 , file2 , file3 and file4 and puts the archive in myOpDir. The name of the final zip archive will be given by the current timestamp. For eg : final_20111220_103015.zip #create a directory for putting all the files myFolder="/home/user/Desktop/myFolderWithContents" myOpDir="/home/user/Desktop/myFinalDir" file1="/home/user/Desktop/test.tcl" file2="/home/user/Desktop/test.dump.xml" file3="/home/user/Desktop/myDir/test.txt" file4="/home/user/Desktop/myDir/test.txt.xml" mkdir $myOpDir/temp # copy the files and folder to to temp dir cp -r $myFolder $myOpDir/temp/` cp $file1 $myOpDir/temp/test.tcl cp $fil