Tuesday, August 11, 2009

How do I add more swap memory in ubuntu?

You entered the wrong swap size no problem I'll show you how to increase your swap
I will create a 512Mb swap file:
Enter in bash this line:

1. sudo dd if=/dev/zero of=/mnt/512Mb.swap bs=1M count=512
2. sudo mkswap /mnt/512Mb.swap
3. sudo swapon /mnt/512Mb.swap
4. gksudo gedit /etc/fstab
add this line in the fstab file you just launched:
/mnt/512Mb.swap none swap sw 0 0
5.Reboot

How to create a large file in Ubuntu

Use the dd command

Here is the syntax of the dd command to create the file.
I will fill the file with NULL characters.
dd if=/dev/zero of=test.tst bs=1k count=4700000
if = input file
of = output file
bs = block size
count = file size in kb
the file size is given by multiplying bs and count

Example create a 1 GB file:
dd if=/dev/zero of=file_1GB.txt bs=1m count=1k

How to create a large file in windows command line

To create a large file of 1MB do this:
Run->cmd
fsutil file createnew c:\myfile.txt 1000000

To create a large file of 100MB do this:
Run->cmd
fsutil file createnew c:\myfile.txt 100000000

and so on.The number at the end tels you how big the file will be

Saturday, July 25, 2009

How to compact files and folders at the Comman Line

COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]

/C Compresses the specified files. Directories will be marked
so that files added afterward will be compressed.
/U Uncompresses the specified files. Directories will be marked
so that files added afterward will not be compressed.
/S Performs the specified operation on files in the given
directory and all subdirectories. Default "dir" is the
current directory.
/A Displays files with the hidden or system attributes. These
files are omitted by default.
/I Continues performing the specified operation even after errors
have occurred. By default, COMPACT stops when an error is
encountered.
/F Forces the compress operation on all specified files, even
those which are already compressed. Already-compressed files
are skipped by default.
/Q Reports only the most essential information.
filename Specifies a pattern, file, or directory.

Used without parameters, COMPACT displays the compression state of
the current directory and any files it contains. You may use multiple
filenames and wildcards. You must put spaces between multiple
parameters.

Saturday, July 11, 2009

User State Migration Tool-How to migrate user accounts and user settings

  1. Log on to the source computer as an administrator, and specify:

    scanstate \\fileserver\migration\mystore /i:miguser.xml /i:migapp.xml /o

  2. Log on to the destination computer as an administrator.

  3. Do one of the following:

    • If you are migrating domain accounts, specify:

      loadstate \\fileserver\migration\mystore /i:miguser.xml /i:migapp.xml

    • If you are migrating local accounts along with domain accounts, specify:

      loadstate \\fileserver\migration\mystore /i:miguser.xml /i:migapp.xml /lac /lae

Saturday, July 4, 2009

Can't Creat a Performance log alerter

Start the Performance Logs and Alerts service by using the Local System account instead of the Network Service account:
  1. Click Start, click Run, type services.msc in the Open box, and then click OK.
  2. In the Name list, double-click Performance Logs and Alerts.
  3. Click the Log On tab, click Local System account, click Apply, and then click OK.
  4. Quit the Services dialog box, and then restart the ISA Server performance counter log.

Friday, July 3, 2009

Changing System Restore Options in the Windows Registry

In most situations, the default System Restore operation is satisfactory. However
there might be situations in which you need to change how System Restore functions. There are four settings that you can change in the Windows Registry tha affect the intervals System Restore uses when creating automatic restore point and the disk space it uses.
Each of these settings is located in the HKEY_LOCAL_MACHINE\SOFT
WARE\Microsoft\Windows NT\CurrentVersion\SystemRestore subkey.
These settings include the following:
1.RPSessionInterval This setting specifies the intervals, in seconds between scheduled restore-point creations during an active user session. The default value is 0 seconds (disabled).
2.RPGlobalInterval This setting specifies the time interval, in seconds, a which scheduled restore points are created (regardless of whether or no there is an active user session). The default value is 86,400 seconds (24 hours).
3.RPLifeInterval This setting specifies the time interval, in seconds, for which restore points are kept. System Restore deletes restore points older than the specified value. The default value is 7,776,000 seconds (90 days).
4.DiskPercent This setting specifies the maximum amount of disk space on each drive that System Restore can use. This value is specified as a percentage of the total drive space. The default value is 12 percent.

Thursday, July 2, 2009

Group Policy Verification

1.Type in Run--> rsop.msc and press enter.This will launch the Resultant Set of Policy wich will show you what group and security policyes are in efect on your PC.
2.Or you can run it from a Run-->>mmc from File menu add/remove snap-in select Resultant Set of Policy snap-in and ok. Right click on Resultant Set of Policy to generate the policy data for local or remote computer(folow the wizard).
3.Windows XP Professional also supplies a tool named Group Policy Result Tool,which is a command-line utility that helps you determine which policies are actually applied to a computer. You can start this tool by typing Gpresult.exe at the command prompt(run-->cmd).

Wednesday, July 1, 2009

Repair a network connection

1.See if the cable is pluged in or if is not broken someware.
2. ping your domain controller,your dns server and your gateway(if you have them if not skip this step). ex: cmd -->ping 192.168.1.1(dns ip adress)
3. Attempts to renew the connections DHCP lease:
ipconfig /renew command at the command prompt.
4. Flushes the Address Resolution Protocol (ARP) cache,
arp -d command at the command prompt.
5. Reloads the NetBIOS name cache:
nbstat -R command at the command prompt.
A NetBIOS name update is also needed, which is using the nbtstat –RR command.
6. Flushes the Domain Name System (DNS) cache:
ipconfig /flushdns command at the command prompt.
7. Registers the computer’s DNS name:
ipconfig /registerdns command at the command prompt.
8.If non of this works you shoud see if the network card drivers are ok or the network adapter is ok.

Tuesday, June 30, 2009

list the file and print shares on the computer

The Net View command is a command that you can use to test TCP/IP connec-
tions. To use the command, log on with the proper credentials that are required to
view shares on a remote or local computer, open a command prompt, and type
net view \\ComputerName or net view \\IP Address.
The resulting report lists the file and print shares on the computer. If there are no file or print shares on the computer, you see the message There Are No Entries In The List.

Monday, June 29, 2009

File Encription with Cipher

The Cipher command provides the capability to encrypt and decrypt files and folders
from a command prompt. The following example shows the available switches for the
Cipher command:

cipher [/e | /d] [/s:folder_name] [/a] [/i] [/f] [/q] [/h] [/k] [file_name [...]]

/e Encrypts the specified folders. Folders are marked so any files that are added later are encrypted.
/d Decrypts the specified folders. Folders are marked so any files that are added later are not encrypted.
/s Performs the specified operation on files in the given folder and all subfolders.
/a Performs the specified operation on files as well as folders. Encrypted files could be decrypted when modified if the parent folder is not encrypted. Encrypt the file and the parent folder to avoid problems.
/i Continues performing the specified operation even after errors have occurred. By default, Cipher stops when an error is encountered.
/f Forces the encryption operation on all specified files, even those that are already encrypted. Files that are already encrypted are skipped by default.
/q Reports only the most essential information.
/h Displays files with the hidden or system attributes, which are not shown by
default.
/k Creates a new file encryption key for the user running the Cipher command. Using this option causes the Cipher command to ignore all other options.
file_name specifies a pattern, file, or folder.

Saturday, June 27, 2009

Create a Run Shortcut

You can create a shortcut to the Run command. Simply select the Run command on the Start menu, and drag it to the Quick Launch toolbar or to Desktop. The new shortcut uses the same icon, so it's easy to identify.

Friday, June 26, 2009

Hot to use Run As in Comman Prompt

About runas

Enables a user to execute a program on another computer as yourself or as another user.

syntax

RUNAS [/profile] [/env] [/netonly] /user: program

/profile if the user's profile needs to be loaded
/env to use current environment instead of user's.
/netonly use if the credentials specified are for remote access only.
/user should be in form USER@DOMAIN or DOMAIN\USER
program command line for EXE. See below for examples

Examples:
runas /profile /user:mymachinename\administrator cmd
runas /profile /env /user:mydomain\admin "mmc %windir%\system32\gpedit.msc"
runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

How to permit restricted users to creat shared folders

Create permanent shared objects

This user right determines which accounts can be used by processes to create a directory object in the Windows 2000 Server, Windows 2000 Professional, Windows XP Professional, and Windows Server 2003 family object manager.

You can configure this security setting by opening the appropriate group policy object and expanding the console tree as such: Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Create Permanent Shared Objects (add users group or domain users group).Reboot PC done.

Tuesday, June 2, 2009

How to use 7 zip in ubuntu linux

Type: sudo aptitude install p7zip p7zip-full p7zip-rar
You can Right Click and Extract or in Shell .

How to extract files in Shell:

Extracting

Extracting is simple. From the shale, navigate to the folder where the arhive(rar,zip etc.) are located (type "cd /path/to/folder" for example without quotes). Then, type:

7z x YourFileName.rar

If your archive is split into multiple volumes, specify the lowest numbered volume.

7z x YourFileName.7z.001

If you want to extract to another location simply add "-o" follow by that location to the end of the command:

7z x FileName.7z -o/home/user/Desktop/foldername

Friday, January 23, 2009

I can't open my stick from my computer

Today I met a stick malware that stops your from accesing your USB from my computer.
This is a malware that is very annoing and is spreads very fast thru your stick.No antivirus i tried coul'd find it.The problem is that it spreads on the computer that you put your stick in and if another person puts his stick in the infected computer it infects that stick too.
I found a malware remover ComboFix.exe that removes it finnaly.Good luck