Tag: linux
One liner: To get available virtual memory
vmstat -s -SM | grep “free memory” | awk -F” ” ‘{print$1}’
[HowTo] Replace ip address using sed
Following one-liner will search for a ip address pattern in the specified file and replace it with the one provided : sed ‘s/[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}/IPADDRESS-COMES-HERE/g’ /SourceFilename > /DestinationFilename
OpenSuse 11.4 [screenshots]
How to Install Latest Firefox 4 and Firefox 3 in Ubuntu ?
How to Install Latest Firefox 4 and Firefox 3 in Ubuntu ? Do the following in Terminal to install latest Firefox 4.0 and Firefox 3 in Ubuntu. sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa && sudo apt-get update sudo apt-get install firefox-4.0 sudo apt-get install firefox
ERROR: `phpize’ failed [solved]
If you get the following error install the development files of PHP. running: phpize sh: phpize: not found ERROR: `phpize’ failed On Ubuntu/Debian you could run the following line in the terminal : apt-get install php5-dev that’s it 🙂
Ubuntu 11.04 Alpha 1 x64 Vmware Image
My friend JD uploaded a Vmware image of Ubuntu 11.04 Alpha 1 so am sharing it here : Attributes : 64 bits Gnome desktop VMWare Image Compressed size : 832 mb Actual size : 3.25 gb RAR compression in best mode (took about 20 mins to compress) Fresh installation USERNAME: user PASSWORD: password Ram […]
How To Get The Current Epoch Time (Unix Timestamp)
Perl time PHP time() Ruby Time.now (or Time.new). To display the epoch: Time.now.to_i Python import time first, then int(time.time()) Java long epoch = System.currentTimeMillis()/1000; Microsoft .NET C# epoch = (DateTime.Now.ToUniversalTime().Ticks – 621355968000000000) / 10000000; VBScript/ASP DateDiff(“s”, “01/01/1970 00:00:00”, Now()) Erlang calendar:datetime_to_gregorian_seconds(calendar:now_to_universal_time( now()))-719528*24*3600. OR element(1, now()) * 10000 + element(2, now()). MySQL SELECT unix_timestamp(now()) PostgreSQL SELECT extract(epoch […]
Preserve File Permissions While Copying Files in Linux
Following is the command : > cp -p /aaa/bbb /ccc/ddd
ISSANI GNUSL3S LINUX OS
Description : ISSANI GNUSL3S LINUX OS provides a rare and huge collection of pre-installed software, including a well-organised graphical user interface and useful recovery tools for system administrators. A full range of development tools, editors, and current libraries is included for users who wish to develop or compile additional software. With this distribution you just […]