Friday, March 19, 2010

Useful Commands and Concepts


Useful Commands
1. To know system information
Start>Run>Winmsd.exe
2. To know IP configuration
Start>Run>cmd>ipconfig /all
3. To know MAC address of system
Start>Run>cmd>ipconfig /all – in this physical address with 6 set of character is mac address of system
4. To see services running
Start>Run>services.msc
5. To connect remote pc
Start>Run>mstsc
6. Open the Group Policy Object Editor
Start>Run>gpedit.msc
7. To open registry
Start>Run>Regedit
8. To connect other pc
Start>Run>Ping computername or ip
9. To set disk quota
Start>Run>gpedit.msc
Computer Configuration > Administrative Templates > System > Disk Quotas.
10. To get disk signature number of your machine
Start>Run>Cmd>Diskpart
Diskpart>select Disk 0
Diskpart>detail disk
11. To open task manager
Ctrl+shift+Esc
12. To create hardlink file
Start>Run>cmd
Go to folder directory
>fsutil hardlink create “new file path” “old filepath”
v To Enable role of Hyper V in windows server 2008 64 bit or R2
Steps
· Go to server manager
· Roles
· Add role
· Select Hyper V and follow wizard.
v To install IIS role in windows server
Steps
· Go to server manager
· Roles
· Add role
· Select Hyper V and follow wizard.
v To create Hard link on windows system
Steps
· Create c:\Test.txt file (any type of file)
· Start>Run>Cmd
· >Cd \
· >fsutil hardlink create “c:\test2.txt” “c:\test.txt”

v To create Hard link on Unix
· To create a hard link of the file /export/home/fred/stuff to /var/tmp/thing, use:
ln /export/home/fred/stuff /var/tmp/thing
· The syntax for creating a hard link of a directory is the same. To create a hard link of /var/www/html to /var/www/webroot, use:
ln /var/www/html /var/www/webroot
v Steps of Configure Virtual Machine
· Right click in right panel of vmware > Add Virtual Machine
· Select path where you want to store your virtual machine (or space of virtual machine)
· Select network path
· Add disk size
· Add ram
· Start virtual machine
· Install operating system
· Install vmware tools
· Give computer name
· Give IP of computer
· Set firewall off (as per requirement)
· Add required software
· Take snapshot
Hard link
A hard link is the file system representation of a file by which more than one path references a single file in the same volume.
Any changes to that file are instantly visible to applications that access it through the hard links that reference it. However, the directory entry size and attribute information is updated only for the link through which the change was made. Note that the attributes on the file are reflected in every hard link to that file, and changes to that file's attributes propagate to all the hard links. For example if you reset the READONLY attribute on a hard link to delete that particular hard link, and there are multiple hard links to the actual file, then you will need to reset the READONLY bit on the file from one of the remaining hard links to bring the file and all remaining hard links back to the READONLY state.
Any number of hard links to the physical data may be created. To access the data, a user only needs to specify the name of any existing link; the operating system will resolve the location of the actual data.
If one of the links is removed with the POSIX unlink function (for example, with the UNIX 'rm' command), then the data is still accessible through any other link that remains. If all of the links are removed and no process has the file open, then the space occupied by the data is freed, allowing it to be reused in the future. This semantic allows for deleting open files without affecting the process that uses them
Limitation of Hard link
1) Most modern operating systems don't allow hard links on directories to prevent endless recursion.
2) Hard links can only be created to files on the same file system. If a link to a file on a different file system is needed, it may be created with a symbolic link.
3) The maximum number of hard links to a single file is limited by the size of the reference counter: with NTFS this is limited to 1023 because a 10 bit field is used for this purpose. On Unix-like systems the counter is usually machine word-sized (32 or 64-bit: 4294967296 or 18446744073709551616 links, respectively).
Disk Quotas
The NTFS file system supports disk quotas, which allow administrators to control the amount of data that each user can store on an NTFS file system volume. Administrators can optionally configure the system to log an event when users are near their quota, and to deny further disk space to users who exceed their quota. Administrators can also generate reports, and use the event monitor to track quota issues.

No comments:

Post a Comment