Showing posts with label Mics. Show all posts
Showing posts with label Mics. Show all posts

Friday, 6 February 2015

How Antivirus Software Works

Due to ever increasing threat from virus and other malicious programs, almost every computer today comes with a pre-installed antivirus software on it. In fact, an antivirus has become one of the most essential software package for every computer.
Even though every one of us have an antivirus software installed on our computers, only a few really bother to understand how it actually works! Well, if you are one among those few who would really bother to understandhow antivirus works, then this article is for you.

How Antivirus Works:

An antivirus software typically uses a variety of strategies in detecting and removing viruses, worms and other malware programs. The following are the two most widely employed identification methods:

1. Signature-based dectection (Dictionary approach)

This is the most commonly employed method which involves searching for known patterns of virus within a given file. Every antivirus software will have a dictionary of sample malware codes called signatures in its database. Whenever a file is examined, the antivirus refers to the dictionary of sample codes present within its database and compares the same with the current file. If the piece of code within the file matches with the one in its dictionary then it is flagged and proper action is taken immediately so as to stop the virus from further replicating. The antivirus may choose to repair the file, quarantine or delete it permanently based on its potential risk.
As new viruses and malwares are created and released every day, this method of detection cannot defend against new malwares unless their samples are collected and signatures are released by the antivirus software company. Some companies may also encourage the users to upload new viruses or variants so that, the virus can be analyzed and the signature can be added to the dictionary.
Signature based detection can be very effective, but requires frequent updates of the virus signature dictionary. Hence, the users must update their antivirus software on a regular basis so as to defend against new threats that are released daily.

2. Heuristic-based detection (Suspicious behaviour approach)

Heuristic-based detection involves identifying suspicious behaviour from any given program which might indicate a potential risk. This approach is used by some of the sophisticated antivirus software to identify new malware and variants of known malware.
Unlike the signature based approach, here the antivirus doesn’t attempt to identify known viruses, but instead monitors the behavior of all programs.
For example, malicious behaviours like a program trying to write data to an executable program is flagged and the user is alerted about this action. This method of detection gives an additional level of security from unidentified threats.
File emulation: This is another type of heuristic-based approach where a given program is executed in a virtual environment and the actions performed by it are logged. Based on the actions logged, the antivirus software can determine if the program is malicious or not and carry out necessary actions in order to clean the infection.
Most commercial antivirus software use a combination of both signature-based and heuristic-based approaches to combat malware.

Issues of Concern:

Zero-day threats: A zero-day (zero-hour ) threat or attack is where a malware tries to exploit computer application vulnerabilities that are yet unidentified by the antivirus software companies. These attacks are used to cause damage to the computer even before they are identified. Since patches are not yet released for these kind of new threats, they can easily manage to bypass the antivirus software and carry out malicious actions. However, most of the threats are identified after a day or two of its release, but damage caused by them before identification is quite inevitable.
Daily Updates: Since new viruses and threats are released every day, it is most essential to update the antivirus software so that the virus definitions are kept up-to-date. Most software will have an auto-update feature so that, the virus definitions are updated whenever the computer is connected to the Internet.
Effectiveness: Even though an antivirus software can catch almost every malware, it is still not 100% foolproof against all kinds of threats. As explained earlier, a zero-day threat can easily bypass the protective shield of the antivirus software. Also virus authors have tried to stay a step ahead by writing “oligomorphic“, “polymorphic” and, more recently, “metamorphic” virus codes, which will encrypt parts of themselves or otherwise modify themselves as a method of disguise, so as to not match virus signatures in the dictionary.


Thus user awareness is as important as antivirus software; users must be trained to practice safe surfing habits such as downloading files only from trusted websites and not blindly executing a program that is unknown or obtained from an untrusted source. I hope this article has helped you understand the working of an antivirus software.

Tuesday, 9 December 2014

How to use Android 5.0 Lollipop

How to use Android 5.0 Lollipop Android 5.0 Lollipop is a big change from Android 4.4 KitKat. It changes the interface, using what Google calls "Material Design", which is based on the idea of tangible layers. This design scheme is seen throughout the entire OS, but along with these visual changes, Android 5.0 benefits from some excellent updates, adding more usability to sections like notifications, better battery life, and multiple user accounts (great for parents).
If you're new to Android with Android 5.0 Lollipop, you may be surprised at all the options available. This is especially true if you're coming from iOS, in which case you should read our tutorial about switching from iOS to Android.
Current Android users will be able to jump into Lollipop will little problem, but Android newbies may get confused. Android 5.0 Lollipop is rolling out now so get ready with this guide.

Setup

If you're using an older Android device with NFC and have upgraded to a new device, you can use a feature called Tap & Go. It works the same way that Android Beam works when pushing content from one device to another. The difference with Tap & Go is that is restores your existing system settings and apps to the new device.android 5.0 lollipop tap & goYou will have to download apps again, but it makes the process much easier than before, where a restoration could include your entire library of apps rather than the select ones that you use. Take note though, that while Tap & Go works with any Android device with NFC (including custom ROMs) and the latest Google Play Services app, it will only directly mirror the Google Launcher. This means that people using custom launchers will have to setup the launcher again.android 5.0 lollipop home screenLollipop will ask some standard questions during setup, like to enable Google Now and asking for feedback from the device. It's up to you to allow Google to collect these stats. The apps will then download to the device (I'd recommended letting the device restore on a Wi-Fi connection).
You can also use another option that lets you choose which apps to install. This is a good way to streamline your app library by not installing apps you don't use. This setup only works if you previously had a Google account and an Android device.

Set up your account

If you're going to use an Android device, you're required to have a Google account. Your account is the gateway to Google's different services and apps, going beyond Gmail to includes the Google Play Store, Google Maps, and a lot of other services like contacts.
If you don't have a Google account, create a Gmail account. This will let you log into the different apps that will save your information and share it with other apps.
Of course, you may already have a Google account even if you've never used Android, and your Gmail account can be used to sign into the device. Be aware that while Google does collect information, it's used to improve the different services within the Android ecosystem. You can opt out of a lot of services, although you will be missing some features.

Customize your Settings

Before you download a single app, you should customize settings. Customizing individual settings will tailor your device to your needs. A lot of these settings can have an impact on battery life, and it might be better to disable some features. Lollipop is said to have a better battery life, but it's still know known how much better it is.

Wireless & Networks

Wi-Fi

Whenever you're home, connect to your wireless network. By switching Wi-Fi on, Android 5.0 Lollipop will scan for available networks. During the initial setup of Android 5.0 Lollipop, it will ask to connect to a wireless network, so you should already have access.
Tap on the three dots icon for more options, and then tap on Advanced.android 5.0 lollipop wireless optionsOne option you might not need is Scanning always available. This allows apps to scan for networks even if Wi-Fi is turned off. Always scanning can affect battery life, and most likely, you won't need this option enabled.
Another option is Wi-Fi frequency band. Depending on what type of router you have, it will support only 2.4 GHz, only 5 GHz, or both. If your router is old, it probably doesn't support 5 GHz.android 5.0 lollipop wireless frequencyA problem in Android 4.4 KitKat was that scanning for both frequencies could cause connection problems. If you know what frequency your router is, select that specific band. In most cases, leaving the 2.4 GHz option selected leads to fewer problems, but this issue could be solved with Android 5.0 Lollipop.

Bluetooth

If you connect your device to any Bluetooth devices like an earpiece, car, or Android Wear, you'll need to enable Bluetooth. If you never use Bluetooth, turn it off because it will scan for different devices.android 5.0 lollipop bluetooth

Data usage

The Data Usage meter is a great tool if you have a data cap on your wireless plan. Android 5.0 goes even farther with Network Restrictions. It will set wireless connections like cell data plans and restrict background data. This is helpful if you have a data cap on your home internet service. Otherwise, you can leave this option alone.android 5.0 lollipop data usage

More

There are a lot of options under the More section. If you've used recent version of Android though, the options are the same. The main feature you'll want to look at is the Default SMS app. Google pushed Hangouts to combine SMS/MMS and Google Hangouts in one app, but in Android 5.0, the Messaging app is back. Google wants to give people the option of choosing from using Hangouts or a stock app.android 5.0 lollipop more

NFC/Android Beam

This feature is used with Google Wallet payments and sharing other forms of content. It doesn't use a lot of battery so you can leave it enabled without worrying.

Display

A big drain on battery is the screen. In most cases, you can use Adaptive Brightness and the phone will dim when necessary. If you want to get the most out of the battery manually, set the screen brightness as low as possible.

Sleep

Sleep on a phone refers to when the screen automatically turns off. In most cases, 15 seconds is plenty of time, unless you're reading something and you don't touch the screen. At most, the option should be set to 1 minute, but you'll still see the battery drain faster than if it was set to 15 seconds.android 5.0 lollipop sleep

Sound & notifications

Android 5.0 Lollipop has expanded notifications a lot. It's added a lot of new features to make notifications more useful. One big addition is that notifications display on the lock screen and it's much easier to act on them.

Interruptions

This new feature adds a priority mode to Android 5.0. You can set priorities to different things like events, calls, and messages, but the feature won't work unless you set Downtimefor when priority interruptions will display. Essentially, it works the same as iOS 8's Do Not Disturb. You can set specific days and the time range to silence disturbances, but the best use is probably to silence your phone when you're sleeping so that you're not woken up with a message.android 5.0 lollipop interruptions

Notifications

Android notifications are great, but sometimes it can get overwhelming. There are new options like what notifications display on the lock screen. App Notifications are app-specific settings for the type of notification.
You can entirely block notifications (great for spammy social media apps), mark it as priority so it always displays, or mark it as sensitive so that it doesn't display on the lock screen. The When device is locked and App notifications options work together, so you'll need to customize your apps after you've installed them all.android 5.0 lollipop app notifications

Storage

The main use for Storage is to clear Cached data in Android. If you use streaming music apps, they will usually cache playback data, and this can consume a lot of space. Otherwise,Storage is a simple way to track space.

Battery

The Battery section shows system services and apps that are using battery. Android 5.0 Lollipop has improved battery management by adding approximate remaining time.
If you tap on the three dot menu and select Battery saver, there will be two options. One is to leave it on all the time, which adds a Google Play Music-style orange bar to the top and bottom of the screen. While it's useful, Battery saver will slow down performance and restrict background updates to apps like email or messaging, to save battery life.android 5.0 lollipop batteryThe second option is to let the feature automatically turn on at 15% or 5% battery. This is a better option because it will restrict the device when you need battery the most. According to Google, Lollipop should have improved battery life, but adding this feature will still be useful for older devices.

Apps

The Apps section supplies a lot of information. The first section, Downloaded, displays all the apps you've installed. You shouldn't be surprised about apps in this list.
An addition to this section is the Device memory meter that sits above the Running apps section. It shows the amount of RAM that's being used by the system, as well as apps and available free RAM. This is great for people who want to know which apps are using a lot of RAM. When you tap on an app to see detailed information, you're shown the different services and processes.android 5.0 lollipop appsYou also have the option to "Stop" or "Report" the app. Reporting the app will give Google some information about your device and how the app is running, but it also gives Google data about possible malicious apps.

Users

A feature that was only available on Android tablets now comes to Android phones. You can now create multiple users on a single phone, giving each person their own section to use.android 5.0 lollipop add userIf you already have a Google account, you'll able to log into the device with it.

Location

Location reporting is necessary for apps like Google Maps or Foursquare. The problem that can arise is that location services can drain battery a lot if your device is sending data all the time.android 5.0 lollipop locationYou can set the accuracy level in the Location settings for High accuracy, which uses GPS, Wi-Fi, and cell data for your location. Battery saving only uses Wi-Fi and cell data, whileDevice only uses only GPS .
If you want your battery to last, set your option to Battery saving, but expect a delay with apps that rely on location.

Security

Screen Security

You must enable a screen lock on your device, the first step in security for your device. Android offers four options: swipepatternpin, and password.
Swipe isn't even a lock, it's a way to see notifications before entering the home screen.PatternPin, and Password are more secure ways to lock your device, and one of these should be enabled.android 5.0 lollipop securityYou should also set the auto lock for the screen. There are a lot of time options, but you should either set it to "immediately" or at a maximum of 15 seconds. Owner info is a way to put contact information if case you lose your device and if you have Android Device Managerenabled, you'll be able to locate your device using the web.

Smart lock

Smart Lock is a feature using trusted devices paired with Android. Google highlights the feature with paired Android Wear, and it works by recognizing a paired Bluetooth device. If it's connected, you don't need to use your screen lock code. The moment Bluetooth is unconnected, the device requires the screen password again.android 5.0 lollipop smart lockAnother option is Trusted Face. Using the front camera, it looks at your face and unlocks the phone. The problem with this feature is that it's not as secure as the other methods, although Google admits that before you can set it up.
The release of Android 5.0 also included another option called Trusted Places. This lets you setup a secure place where your device will never require your screen lock password to unlock a device. It's a great option if you're home or at work, but keep in mind that having your device unlocked negates any security.android 5.0 lollipop trusted places

Encrypt phone

By default, any preloaded device will have device encryption turned on. If you're upgrading to Android 5.0, you should encrypt your device. Be aware that the setup will take at least an hour, during which time you shouldn't touch your phone at all.

Device administration

When it comes to Device administration, you should be most concerned with Unknown sources. Enabling this option lets you install apps outside of Google Play. Unless you know about APKs or develop apps, you shouldn't have this enabled because it can give apps unnecessary access to your device. To be safe, you should only download apps through the Google Play Store.android 5.0 lollipop device administrators

Screen pinning

This option lets you lock an app so that you'll only be able to use that app for the time being. It works via Recent apps, where you'll see the first app with the pin icon at the bottom right of the card. Tapping on the pin locks the device to this single app.android 5.0 lollipop screen pinningTo exit, hold the Back and Recent buttons at the same time. If you want to add an extra layer of security, you can enable the option to ask for the unlock pattern.

Accounts

This is where you can view all the different accounts that you're signed in to. This includes Google, social media, and other apps that require syncing. You should recognize all the apps in this list.

Backup & reset

Back up my data will save data to Google servers. This includes apps, passwords, and other settings. Automatic restore allows Google to restore backed up data.android 5.0 lollipop backup and restore
These are the most important sections of Settings that you should set up if you get a new device.

New Android 5.0 Lollipop features

Notifications

Android 5.0 displays notifications on the lock screen, something that was previously only possible with apps or custom Android ROMs (custom versions of Android). When you wake up your device, you will see recent notifications. If you pull down an individual notification, it expands and shows more information. If you have Google Now enabled, the bottom of notifications will have Google Now information. If you wake the phone up and use the volume keys, you'll be able to set sound notifications for All, Priority only (with a timer), or None (with a timer)android 5.0 lollipop notificationsIf you pull down the expanded notifications again, you'll see Quick Settings. This area includes options for Wi-Fi and Bluetooth, along with a new Flashlight icon to use the camera flash as a flashlight. You also get battery percentage and the gear icon for Settings. If you have a screen lock, you will need to unlock the device before you can access Settings.android 5.0 lollipop quick settingsTo dismiss all the notifications, at the bottom of the notifications, you'll see three staggered bars. Tap on them to dismiss all notifications.

Recent apps

Changing Material Design also changed the Navigation Bar (the bottom set of icons), although the refreshed icons perform the same functions as before. Android 5.0 also changes the way that apps are presented by creating cards for each app instead of square snapshots, which was the same since Android 4.0 Ice Cream Sandwich.android 5.0 lollipop recent appsAn interesting feature is that with the recent apps, different sections are shown as separate cards, and you can scroll through them. The redesign of this section makes it a lot easier to navigate, but it could also get congested quickly.
You can also pin apps to lock them so that, for example, if you're handing off your phone to show someone something, they won't go snooping. It's not a feature that most people will need to use, but for parents, it's a great way to lock a game for kids to play without being able to access the rest of the phone.

Google Now

If you're already using Google Now, you know the power it has. Connected to your Google account– notably, Gmail– Google Now supplies a lot of information. While it takes time to customize it and get really relevant results, the Google Search-connected feature is worth it.android 5.0 lollipop google nowGoogle Now received quite a nice update in Material Design. Previously, Reminders, customization options, and settings were hidden at the bottom of the screen. Now, they're available through the menu tab in the Google search bar. This makes it much easier to customize your results and choose what kind of updates you get.
Google Now gets better the more you use it, so it's a feature you shouldn't ignore.

Widgets

Android 4.4 KitKat users won't be surprised with the addition of widgets to the home screen. Just tap and hold the screen and you'll open the options for wallpapers, widgets, and settings. The settings menu isn't Android 5.0 settings, but Google account settings. You can set different search options, voice, accounts, privacy, and Google Now notifications.android 5.0 lollipop widgetsNote, while using widgets for updates is useful, it can affect battery life.

Google Play Store

The Google Play Store is Android's store for apps, movies, music, and reading. Android 5.0 Lollipop's Material Design improved the Google Play interface a lot, making it easier to find, download, and buy content.android 5.0 lollipop google play store
Games has subheadings for top lists, but quality can vary a lot. In the Apps section, you will find all the non-games apps.
Movies & TV has tons of shows that can be bought or rented. If you purchase them, you'll be given the option of downloading in standard or high definition, for when you're offline or streaming them.
android 5.0 lollipop google play store games
There are also sections for magazines and books if you like reading. The same downloading option is available as that for Movies & TV, otherwise the content is streamed to the device.
Google has spent a lot of time improving Android by pulling apps out of the operating system and supplying them as individual apps. While this does increase the number of apps you'll have, having these apps available as standalone downloads means that Google can update them whenever it's required, rather than offering an entire update to the Android OS.

A step forward

Since Android 4.0 Ice Cream Sandwich, the incremental improvements to the operating system have made it more powerful and useful. With Android 4.3 Jelly Bean and Android 4.4 KitKat, many of the final steps were put in place, and Android 5.0 Lollipop is the result of all this work. When Android 5.0 Lollipop is officially released, there could be even more improvements, but for that, we'll just have to wait and see.
Follow me on Twitter: @chrislikesrobot

Friday, 5 December 2014

A boat like pattern in JAVA

Here come another time-pass pattern from our friend Soham Chakraborty. It gives a boat like pattern. I am not the actual author of this code. Enjoy it !!!
Code:

class Pattern{
public static void main(){
int sp=15,s=0,d=17;

for(int i=1;i<=6;i++){
for(int j=0;j<sp;j++){
System.out.print(" ");}
for(int k=1;k<=i;k++){
System.out.print("! ");}
sp--;System.out.println();
}
for(int i=1;i<=4;i++){
for(int j=0;j<s;j++)
{ System.out.print(" ");}
for(int k=1;k<=d;k++){
System.out.print("* ");}
s++;d--;System.out.println();
}
}
}


Wednesday, 12 November 2014

Chinese hacker installs Windows 98 on an iPhone 6

wCodes Network.

Bored of iOS8? There may be hope. A hacker has successfully installed Microsoft's Windows 98 on his iPhone 6 Plus, using a game emulator available in the App Store.


If you’re an iPhone owner already fed up of iOS 8, the most advanced version of Apple’s mobile operating system yet, there may now be an unlikely alternative.
According to a post on the popular tech forum bbs.feng.com, a pro-active member has successfully installed Windows 98 onto his brand new iPhone 6. The user states that the hack was achieved using iDOS, an emulator available on the App Store, and originally developed for playing classic DOS (Disk Operating System) games on iDevices.
Several blurry images on the forum appear to show the user's black iPhone 6 Plus running Windows 98, complete with the familar washed out turquoise desktop and classy grey window frames.
Although the nostalgic, grey tones of the 16-year-old operating system look as vibrant as ever on the iPhone 6 Plus' screen, you might want to hold out installing for now. Most of the screenshots appear to be error messages, with touch input and a range of other factors making for a less than slick user experience
The iPhone/Windows mutant is the latest in a long line of hacks in which classic software has been persuaded to run on increasingly modern and totally unsuitable machinery. As reported originally by the Verge, a 16 year old has been able to port classics such as Minecraft PE, Doom and Windows 95 to his Android Wear smart watch.



Phonearena also reported how another smartwatch owner has installed first generation Playstation games to their Android Wear device. Using a similar type of emulation software, the pioneering hacker has even posted hands on videos, with play just about possible on the smartwatch’s screen.


Monday, 10 November 2014

Most Wanted Windows DOS Commands

Author- Hiroshi

Microsoft DOS is a command line user interface first introduced in 1981 for IBM computers and was last updated in 1994 when MS-DOS 6.22 was released. Although MS-DOS is not commonly used today, the command shell used through Microsoft Windows is. This page contains some most used and wanted windows Dos Commands

Accessibility Controls = access.cpl
Add Hardware Wizard = hdwwiz.cpl
Add/Remove Programs = appwiz.cpl
Administrative Tools = control admintools
Automatic Updates = wuaucpl.cpl
Bluetooth Transfer Wizard = fsquirt
Calculator = calc
Certificate Manager = certmgr.msc
Character Map = charmap
Check Disk Utility = chkdsk
Clipboard Viewer = clipbrd
Command Prompt = cmd
Component Services = dcomcnfg
Computer Management = compmgmt.msc
Date and Time Properties = timedate.cpl
DDE Shares = ddeshare
Device Manager = devmgmt.msc
Direct X Control Panel (If Installed)* = directx.cpl
Direct X Troubleshooter = dxdiag
Disk Cleanup Utility = cleanmgr
Disk Defragment = dfrg.msc
Disk Management = diskmgmt.msc
Disk Partition Manager = diskpart
Display Properties = control desktop/desk.cpl
Dr. Watson System Troubleshooting Utility = drwtsn32
Driver Verifier Utility = verifier
Event Viewer = eventvwr.msc
File Signature Verification Tool = sigverif
Findfast = findfast.cpl
Folders Properties = control folders
Fonts = control fonts
Fonts Folder = fonts
Free Cell Card Game = freecell
Game Controllers = joy.cpl
Group Policy Editor (XP Prof) = gpedit.msc
Hearts Card Game = mshearts
Iexpress Wizard = iexpress
Indexing Service = ciadv.msc
Internet Properties = inetcpl.cpl
IP Configuration = ipconfig
Java Control Panel (If Installed) = jpicpl32.cpl
Java Application Cache Viewer (If Installed) = javaws
Keyboard Properties = control keyboard
Local Security Settings = secpol.msc
Local Users and Groups = lusrmgr.msc
Logs You Out Of Windows = logoff
Microsoft Chat = winchat
Minesweeper Game = winmine
Mouse Properties = control mouse
Mouse Properties = main.cpl
Network Connections = control netconnections
Network Connections = ncpa.cpl
Network Setup Wizard = netsetup.cpl
Notepad = notepad
Nview Desktop Manager (If Installed) = nvtuicpl.cpl
Object Packager = packager
ODBC Data Source Administrator = odbccp32.cpl
On Screen Keyboard = osk
Opens AC3 Filter (If Installed) = ac3filter.cpl
Password Properties = password.cpl
Performance Monitor = perfmon.msc
Performance Monitor = perfmon
Phone and Modem Options = telephon.cpl
Power Configuration = powercfg.cpl
Printers and Faxes = control printers
Printers Folder = printers
Private Character Editor = eudcedit
Quicktime (If Installed) = QuickTime.cpl
Regional Settings = intl.cpl
Registry Editor = regedit
Registry Editor = regedit32
Remote Desktop = mstsc
Removable Storage = ntmsmgr.msc
Removable Storage Operator Requests = ntmsoprq.msc
Resultant Set of Policy (XP Prof) = rsop.msc
Scanners and Cameras = sticpl.cpl
Scheduled Tasks = control schedtasks
Security Center = wscui.cpl
Services = services.msc
Shared Folders = fsmgmt.msc
Shuts Down Windows = shutdown
Sounds and Audio = mmsys.cpl
Spider Solitare Card Game = spider
SQL Client Configuration = cliconfg
System Configuration Editor = sysedit
System Configuration Utility = msconfig
System File Checker Utility = sfc
System Properties = sysdm.cpl
Task Manager = taskmgr
Telnet Client = telnet
User Account Management = nusrmgr.cpl
Utility Manager = utilman
Windows Firewall = firewall.cpl
Windows Magnifier = magnify
Windows Management Infrastructure = wmimgmt.msc
Windows System Security Tool = syskey
Windows Update Launches = wupdmgr
Windows XP Tour Wizard = tourstart
Wordpad = write
 
Ping
Ping tests a network connection.If successful, ping returns the ip address. Its a very useful and popular command which we need to check whether our internet connection is working properly or not.
Syntax
PING [options] destination_host
Example:
ping 192.168.0.1 -t
Ping Options
-w timeout (Timeout in milliseconds to wait for each reply)
-i TTL (Time To Live)
-v TOS (Type Of Service)
-a (Resolve addresses to hostnames)
-n count (Number of echo requests to send)
-t (Ping the destination host until interrupted)
-l size (Send buffer size)
-f (Set Don’t Fragment flag in packet)
-r count (Record route for count hops)
-s count (Timestamp for count hops)
-j host_list (Loose source route along host_list)
-k host_list (Strict source route along host_list)
destination_host (The name of the remote host)
DIR
Display a list of files and subfolders.
Syntax
DIR [pathname(s)] [display_format] [file_attributes] [sorted] [time] [options]
[display_format]
/P Pause after each screen of data.
/W Wide List format, sorted horizontally.
/D Wide List format, sorted by vertical column.
[options]
/S include all subfolders.
/R Display alternate data streams. (Vista only)
/B Bare format (no heading, file sizes or summary).
/L use Lowercase.
/Q Display the owner of the file.
CLS
Simply typing cls and pressing enter will clear the dos screen.
EDIT
Syntax
EDIT [d:][path]filename [/B][/G][/H][/NOHI]
Starts the MS-DOS editor, a text editor used to create and edit ASCII text files.

HELP
Syntax
HELP [command] [/B][/G][/H][/NOHI]
Displays information about a DOS command.
MEM
Syntax
MEM [/program|/debug|/classify|/free|/module(name)] [/page]
Displays amount of installed and available memory, including extended, expanded, and upper memory.

chkdsk
Syntax
CHKDSK [drive:][[path]filename] [/F] [/V] [/R] [/L[:size]]
Example:
CHKDSK C: /F
[drive:] The drive to check.
filename File(s) to check for fragmentation (FAT only).
/F Automatically Fix file system errors on the disk.
/X Fix file system errors on the disk
/R Scan for and attempt Recovery of bad sectors.
/V Display the full path and name of every file on the disk.
/C Skip directory corruption checks.
Some Useful Resources

Sunday, 9 November 2014

JTar : Java Tar library to create and read tar files using IO streams

Overview

JTar is a simple Java Tar library, that provides an easy way to create and read tar files using IO streams. The API is very simple to use and similar to the java.util.zip package.

Usage

Tar example - using TarOutputStream
   // Output file stream
   FileOutputStream dest = new FileOutputStream( "c:/test/test.tar" );

   // Create a TarOutputStream
   TarOutputStream out = new TarOutputStream( new BufferedOutputStream( dest ) );

   // Files to tar
   File[] filesToTar=new File[2];
   filesToTar[0]=new File("c:/test/myfile1.txt");
   filesToTar[1]=new File("c:/test/myfile2.txt");

   for(File f:filesToTar){
      out.putNextEntry(new TarEntry(f, f.getName()));
      BufferedInputStream origin = new BufferedInputStream(new FileInputStream( f ));

      int count;
      byte data[] = new byte[2048];
      while((count = origin.read(data)) != -1) {
         out.write(data, 0, count);
      }

      out.flush();
      origin.close();
   }

   out.close();
Untar example - using TarInputStream
   String tarFile = "c:/test/test.tar";
   String destFolder = "c:/test/myfiles";

   // Create a TarInputStream
   TarInputStream tis = new TarInputStream(new BufferedInputStream(new FileInputStream(tarFile)));
   TarEntry entry;
   while((entry = tis.getNextEntry()) != null) {
      int count;
      byte data[] = new byte[2048];

      FileOutputStream fos = new FileOutputStream(destFolder + "/" + entry.getName());
      BufferedOutputStream dest = new BufferedOutputStream(fos);

      while((count = tis.read(data)) != -1) {
         dest.write(data, 0, count);
      }

      dest.flush();
      dest.close();
   }
   
   tis.close();
Tip: Always use buffered streams with jtar to speed up IO.

Featured
 Downloads

Examples and resources
  • See JTarTest class, provided with the source, for more detailed examples.
  • Visit the wiki page for more details on Tar format
Please report bugs to the project owner