How to check start, restart or shutdown time of Windows Operating System

How to check start, restart or shutdown time of Windows Operating System. I found 2 ways to check start,restart or shutdown time of windows operating system.
1. Open command prompt and type below command and press enter. It will show up time of Windows OS.
C:\Documents and Settings\abc> systeminfo
2.We can check in Event Viewer.Open event viewer and go to System Events. Find
System Event ID:1074
The process C:\Windows\system32\shutdown.exe (WIN-6FP1VCCPJ0T) has initiated the restart of computer WIN-6FP1VCCPJ0T on behalf of user PR\Administrator for the following reason: No title for this reason could be found
 Reason Code: 0x800000ff
 Shutdown Type: restart
 Comment:
System Event ID:109 
The kernel power manager has initiated a shutdown transition.
Also check many services are stopped at a particular time.
System Event ID :6005  (This event id means the System went down at that time)
System Event ID :6006  (This event id means the System started at that time)



netcat to transfer files between linux and windows


netcat in windows On Source PC(Windows) download and copy nc.exe  netcat works as a Server and Client model.
Below steps show how to copy data from a Windows system into Linux(Ubuntu) system.Currently I am using Ubuntu Server.Varify
Windows System IP :192.168.xxx.xx  and   Linxu(Ubuntu) system IP: 192.168.yyy.yy
                             Copy files from Windows To Linux
Setp1:Download netcat into Windows System and copy nc.exe into the directory where your file is exist.
Ex: C:\test\nc.exe
Step 2:Install netcat on ubuntu
#apt-get install netcat
Step 3: Now netcat is available on both Windows and Linxu(Ubuntu)
Open command prompt and go to the directory where your file is located and run below command.This will act as a Server.
C:\test> type  backup.iso | nc.exe  -l -p 3333  
Note: "type" is a command in windows.
Step 4: Receive backup.iso on the client machineLinux(Ubuntu) with the following.This will act as a Client
 # nc 192.168.xxx.xx 3333 > backup.iso              
Issue a ^C on the source system and your done one u see file size in destination directory. Be sure to check the file to be sure it is the same size as the original.
                               Copy files from Linxu to Windows 
On Linxu system run below command. Now this will act as a Server
#cat backup.iso | nc -l -p 3333            
On Windows Run below command. Now this will act as a Client.
C:\test> nc.exe 192.168.yyy.yy 3333 > backup.iso
Issue a ^C on the source system and your done one u see file size in destination directory. Be sure to check the file to be sure it is the same size as the original.



Linux filesystem

/ : This(/) is the root folder, all other folders come under root.. it is like C: drive in a Windows OS
/boot : Linux kernel and boot loader configuration files
/usr  : This folder and its sub-folders contains user installed programs and utilities and libraries.It is like
Program files in windows.
/etc  : Configuration files of all installed softwares or applications
/var  : This folder contains files that change alot (“Variable files”). Mail, print web spool files
/tmp  : Temp directory
/home : This folder contains the home folders of all the normal (non – root ) users on the system
/dev  : Device files corresponding to various peripherals of your comp. (hard disk, printer, mouse, modem)
/mnt  : Devices mounted onto OS to increase storage space
/lost+found : Orphan files are moved here
/root : Root's home directory
/proc : Process information pseudo filesystem.
/bin  : various console utilities and apps
/sbin : system administration utilities
/lib  : Shared Library files for your operating system.

netstat : check open ports and connections to system

Using netstat command we can see all the used and listening ports on your computer. NETSTAT command will work in Windows and as well as in Linux Operating System.
Linux
Will Show all connected Ports
netstat -an | grep -i "connected"

Will Show all listening Ports
netstat -an | grep -i "listening"

Will Show all established connections
netstat -an | grep -i "established"

Windows 
Will Show all connected Connected Ports
netstat -an |find /i "connected"

Will Show all listening Ports
netstat -an |find /i "listening"

Will Show all established connections
netstat -an |find /i "established"

Note: -i & /i is used to ignore case-sensitive.

restore grub in vyatta router


grub> linux /boot/vmlinuz root=/dev/sda1
grub> initrd /boot/initrd.img
grub> boot
Agter reboot run below command to re-install grub
grub-install /dev/sda
reboot  ##Reboot again to so that the Server will boot normally

How to manually extend the evaluation period for Windows Server 2008

When the initial 60 or 180 days evaluation period nears its end, you can run the Slmgr.vbs script to reset the evaluation period. To do this, follow these steps:

   1. Login As a Administrator. Click Start, and then click Command Prompt.
   2. Type slmgr.vbs -dli, and then press ENTER to check the current status of your evaluation period.
   3. To reset the evaluation period, type slmgr.vbs –rearm, and then press ENTER.
   4. Restart the computer.
   5. Open Computer Properties.  Right Click on Computer ==> Click Properties ==>At Windows Activation 
       Screen ==>  Click on Activate ==> Click on Activate online ==> Click Next to finish actiavation.

This resets the evaluation period to 60 or 180 as per your last evaluation period.

how to get entire system information in ubuntu

facter : It is a tool to collect and display facts about the current system. The library behind Facter is easy to expand, making Facter an easy way to collect information about a system from within the shell or within Ruby.
#apt-get install facter
#facter and press enter to get the system details
Below is the output of facter
# facter
architecture => i386
facterversion => 1.5.4
hardwareisa => unknown
hardwaremodel => i686
hostname => my-desktop
id => root
interfaces => eth0
ipaddress => 192.168.xxx.xxx
ipaddress_eth0 => 192.168.xxx.xxx
kernel => Linux
kernelrelease => 2.6.31-22-generic-pae
kernelversion => 2.6.31
lsbdistcodename => karmic
lsbdistdescription => Ubuntu 9.10
lsbdistid => Ubuntu
lsbdistrelease => 9.10
lsbmajdistrelease => 9
macaddress => 00:16:ec:da:bc:21
macaddress_eth0 => 00:16:ec:da:bc:21
manufacturer => HP Pavilion 061
memoryfree => 1.28 GB
memorysize => 1.90 GB
netmask => 255.255.255.0
netmask_eth0 => 255.255.255.0
network_eth0 => 192.xxx.xxx.0
operatingsystem => Ubuntu
operatingsystemrelease => 9.10
physicalprocessorcount => 1
processor0 => Intel(R) Pentium(R) D CPU 2.80GHz
processor1 => Intel(R) Pentium(R) D CPU 2.80GHz
processorcount => 2
productname => RC562AA-ACJ a1514in
ps => ps -ef
rubysitedir => /usr/local/lib/site_ruby/1.8
rubyversion => 1.8.7
serialnumber => INI6370L08 AP640
sshdsakey => AAAAB3NzaC1kc3MAAACBAOBuTdUYuMv2b3xqIhWVpuRQunyIm6T5xOYqlZbwuBTi66oZwWTfE5rywsUHQL8CExMaofWFxlo3c+mTcxWIL+68ZjY5NZy5irwAl3g/CL4THtHmDCMbCmvdQLZeePElvYNFcmvC+7o3CbZWC2KU2FnzTCuI9vpG1k51OSiZJtdHAAAAFQDUId/oRXYQ281bZ9J42Wrt3VsbgQAAAIEAn74omuvo4qKjr1PE12HZSA2oeqpFajcGctEyxurQXzpLgjWcgs1ip2phjz6kypDIbELG/nvOComWIABADwnBnErwM0uDpchOkghzCFgR7Hk10Ph1/SQ4Si0y8jKZ9VzPxYzhZp0ekpL15QIutJSTbCG7WzlGRl3eHrY0cVgZVs4AAACABl/PgIPo0u8L2jI0R5wpUql1Tb0Ln+LTMt1HZoqR2gb7dmvI3FvNRbJfEMOy8f5YXeELQz1ppwRS8PpAas3Dh+Deg9dVSzKUTZURqOe4X8TWjrhf3I6jn00zvIjmGk0XhB5ueH3uoQsjogL/uRws1Tqk1wxF/xvt25t8jV1WATQ=
sshrsakey => AAAAB3NzaC1yc2EAAAABIwAAAQEAy6l8d9gOYGQ9CHQoQBmoJ74NDnSZBreIXD/nsAwj93i7pCv9LJ1ifybP7am7kJq3qaHhoU3sB8oaTUUfeXMXGfoHrwRvcIdYFdDKQ7KvjpZU7jWSsKECk0aibaVzqni5sixquLXcjte18T7DU1ki/K/sQPvSQII2Y9EWOAzdzoov4ezj30uer6sR6BkXSR5LK3LW+qoRPKT+xIQMBseJ9TZ8Tz7hpiz1AmcmPNhLj61aK0/1bbRBKzfr8bd8kkI3vkHvfE5Sqzu4VplSCNxa9QNG9jNFCdN/cGCYlL7GdWPNdBP3jzFXeLNgH+bTA82FrBqFaQo5bUOBSSCKFZyuaQ==
swapfree => 5.58 GB
swapsize => 5.58 GB
timezone => IST
type => Desktop
uniqueid => 007f0101
uptime => 4 days
uptime_days => 4
uptime_hours => 109
uptime_seconds => 395539
virtual => physical