Skip to main content

Secrets Revealed Part III

The Best Command Line Tricks : -

Save A List of Files to a Text File by Extension

dir *.ext /s /b > files.txtThis command line will create a file called files.txt. When you open this file, there will be a complete list of all the files in that directory and all subdirectories with the .ext extension. You can then open up this text file in any text editor and work this the information.By changing the ext part, you can select different files. For example, if you wanted to list all of the PDF documents, you would type:

dir *.pdf /s /b > files.txt

Get Your IP Address Information

ipconfig /all This will retrieve a pile of information about your network connection and IP information. From this command, you can get:

  • Host Name
  • Primary DNS Suffix
  • Node Type
  • IP Routing Enabled
  • WINS Proxy Enabled
  • DNS Suffix Search List
  • Connection-specific DNS Suffix
  • Network Adapter Description
  • Physical (MAC) Address
  • DHCP Enabled
  • IP Address
  • Subnet Mask
  • Default Gateway
  • DNS Servers

Get Installed Driver Information

driverquery

It can be very useful when troubleshooting to know what drivers are installed on a system. This command will give you a complete listing of the drivers and when they were installed.

Copy Files Via Infrared Port

irftp filename.ext

This will fire up the Wireless Link dialog so that you can copy the specified file via an infrared port.

Find Files Opened By Network Users

openfiles /query

If you are running a system and you want to know who has files open on your computer, this command will provide you a list of those users and the files that they have open.

Note: If you get an error saying The system global flag ‘maintain objects list’ needs to be enabled to see local opened files, you can fix this issue by typing openfiles /local on. You will have to reboot the system but it will resolve the issue.

Monitor Port Activity

netstat -a 30

This will show you all of the TCP/IP ports that are being used on your system and what they are connecting to (or being connected from). It will continue to monitor these ports and refresh the information every 30 seconds. You can change the refresh rate by changing the number at the end of the command.

Recover Information From A Corrupt File

recover filename.ext

If you have a disk with damaged sectors, you can attempt to recover as much information as possible from the damaged file. Data that is not damaged can be retrieved but data in damaged sectors will be lost.

Defragment Remote Computer

rexec remotePC defrag C: /F

This command used the rexec command to force a defragment of the C: drive on the computer named remotePC. You can use whatever you want to for the command (I just used defrag C: /F as an example). This is very useful for remote maintenance.

Retrieve Detailed System Information

systeminfo

With this command, you can retrieve the following information:

  • Host Name
  • OS Name
  • OS Version
  • OS Manufacturer
  • OS Configuration
  • OS Build Type
  • Registered Owner
  • Registered Organization
  • Product ID
  • Original Install Date
  • System Up Time
  • System Manufacturer
  • System Model
  • System type
  • Processor(s)
  • BIOS Version
  • Windows Directory
  • System Directory
  • Boot Device
  • System Locale
  • Input Locale
  • Time Zone
  • Total Physical Memory
  • Available Physical Memory
  • Virtual Memory Max Size
  • Virtual Memory Available
  • Virtual Memory In Use
  • Page File Location(s)
  • Domain
  • Logon Server
  • Hotfix(s)
  • NetWork Card(s)

Automatically Defragment C: Daily

schtasks /create /tn "Defrag C" /tr "defrag c: /f" /sc daily /st 23:00:00 /ru "System"

This will set your computer to automatically perform a complete defrag of the C: drive each day at 11:00:00 PM (23:00:00). It does this by creating a scheduled task called Defrag C. It will run this command under the computer’s system account.

Map A Drive Letter to a Folder

subst W: C:\windows
Sometimes, your directory structure can get pretty deep and complicated. You can simplify this a bit by mapping a drive letter to commonly used folders. In the example that I have given, this will create a drive letter W: and map it to the C:\windows directory. Then, whenever you go into My Computer, you will see a W: drive and when you browse to it, it will automatically take you to the contents of the C:\windows folder.

You can do this with any unused drive letter and any folder that exists on your system.

List All Tasks Running On The Computer

tasklist

It’s always good to know what is running on your system. This is the command line version of the processes tab in Taks Manager.

Kill A Program

taskkill /im programname.exe /f

If, when using the tasklist command, you discover that there is something running you just want killed. This is the way to do it! Just note the program name and use it in place of programname.exe.

Reboot a Remote Computer

shutdown -r -f -m \\remotePC -c "System will be rebooted in 30 seconds"
Sometimes, you just need to reboot a system. This will do it remotely and give the user a 30 second warning.

Super Hide your files

Besides normal hidden files, windows file system provides another attribute for files that makes them super hidden so that they aren’t visible form explorer or with normal dir command. Use the command

attrib +s +h pathtofile

to super hide a file. Replace + symbol with - to remove super hidden attribute from file.

You can also use this command to show hidden files in usb drives, simply use

attrib -s -h *.* c command.

Join multiple mp3 files

Here’s a nice trick that otherwise would require some software to perform. You can join multiple mp3 files to form a single mp3 file. Simply move to the folder in command line where mp3 files are stored that you want to combine and run the command

copy /b *.mp3 newfile.mp3

The wildcard *.mp3 will combine all mp3 files to form a newfile.mp3 file. You can control which files are combined using wildcard parameters.

Here’s a nice trick using this method to embed mp3 file in a jpg image file.

Popular posts from this blog

Sri Sri & Homosexuality – Another media hit job in the making

Sri Sri Ravi Shankar (henceforth named as Mr. Shankar) is not new to controversy. Not even with topics like homosexuality. What the event wasAt an event in the Jawaharlal Nehru University, Ravi Shankar gave a talk on the occasion of the Nehru Memorial lecture on 13th November, 2017. One among the audience lamented that he was ill-treated since he was known to be a homosexual. Then Mr. Shankar stated that he needed to accept himself as he was and love knew no boundaries. Let’s see and hear what he said…Let’s quote Mr. Shankar verbatim as reported by some of the newspapers.
You treat yourself better, doesn’t matter how others treat you. You don’t think you are sick or something’s wrong with you. If you stand up, nobody can insult you… But if you feel weak and meek, and if you feel bad about yourself, nobody can make you feel better.’ Indian Express reported this in addition as well. Let me quote it directly here as well.
This is your tendency now. Just acknowledge it and accept it, and kno…

Once again in Mirik

This is a guest post by my mother, Lily Ray Gangopadhyay.

Once again in Mirik after 17 years, I felt very nostalgic because when we used to visit this place, my sons were little kids. Mirik is one of my favorite places. In 17 years it has obviously changed a lot, but still it remains sparsely populated,little crowded and a clean place.



Dad striking a pose (caption by Sarthak) Since this hill station is not at very high altitude one can enjoy a very comfortable stay here and the roads are very inviting.The lake is the main attraction of this place, the Buddha monastery,view point are very nice. I was lucky that the weather was so clear that Mt. Kanchenjunga was clearly seen all the time. Just for a restful walking around the lake, sitting on the grass and gazing at the bushes of pine and fur trees and the peaks of the Himalayas, this is my most preferred destination.











How to go>> one can take a taxi , share taxi or bus from NJP station,Siliguri bus stand or Bugdogra airport.It is l…

Salesmen of God

Christian evangelicals are similar to parasites[1]. The similarities are simply astounding. Among all predatory religions, Evangelical Christianity has done, by far, the greatest harm to humankind[2]. Like leeches, the Evangelical sucks the lifeblood of an unchristian society till it descends either into chaos and incessant civil conflict or the relegation of the culture to the pages of history(Bowden, 1985). Even in the 21st century this unashamed activity continues(Bhosle, 2003).[3]
Evangelicals usually have a similar methodology when it comes to proselytization. Like parasites, the target is usually one belonging to the most vulnerable section of society. This does not necessarily mean that they try harvesting only the most down trodden of the society(Kelly, 2001). And most certainly, the objective is never the upliftment of the persons involved. The target groups may, for example, belong to ethnic minorities, refugees (both economic and political), caste groups, the poor and the si…