Bitness:- File in Linux

Background One of the great technical leaps in IT Technology in the last 20 years or so, is the co-existence of 32 and 64-bit computing on the same machine. Linux If you are curious as to whether a binary file is 32 or 64-bit and you are on a Linux machine, please use the file … Continue reading Bitness:- File in Linux

DOS/Batch:- Get Current Drive Letter

Outline Current Folder Symbol Meaning Explanation %cd% Change Directory/Current Directory %cd:~0,2% Change Directory/Current Directory 1) cd means to get current folder 2) :~0,2 2a) 0 means do not skip any characters 2b) 2 means to get the next two characters Running Script Symbol Meaning %~d0 Running Script Full Drive %~p0 Running Script Folder %~dp0 Running … Continue reading DOS/Batch:- Get Current Drive Letter

OS Commands:- Find Files Processed In the Last N Days

Background I need to find files that I have worked on lately.   OS OS  Linux Find Command Samples Sample - Find Files modified In the Last 3 Days Outline Folder Folder is . . here means current folder Type Type is f Type is f as in file iname iname means case insensitive name … Continue reading OS Commands:- Find Files Processed In the Last N Days

OS Sort Command:- Sorting by column position

Background Let us sort by column position. Data Files Person.txt Image Metadata Column Position First Name 1 Last Name 2 Email Address 3 City 4 State 5 Postal Code 6 Display Text File Cat Command OS Platform - Win OS Not Supported OS Platform - Linux Parameters Parameter Description T Show hidden characters Syntax Sample … Continue reading OS Sort Command:- Sorting by column position

OS Sort Command:- Sorting by character position

Background When reading sample code and I see the following command I be like hold up, wait a minute. Data Files Person.txt Image Metadata Column Position Column - Start & End First Name 1 1, 20 Last Name 2 21, 40 Email Address 3 41, 70 City 4 71, 90 State 5 90, 100 Postal … Continue reading OS Sort Command:- Sorting by character position

WinMerge:- Compare files across computers

Background I need to compare files across a couple of computers. Issues   Primary Issue I ended up being bothered enough with an issue and started reviewing the code. To remediate the issue I needed to make code changes. After a few hours of slugging along, the changes were well tested.   Secondary Issue This … Continue reading WinMerge:- Compare files across computers

Searching Text:- Case Sensitivity

Background As I looked through a generated file, I was a bit perplexed as to why some matches were missing. Code I went back and looked at the code I was using to generate the file, it looked OK. Yet, at the back of my mind, I am sorry that I did not follow up … Continue reading Searching Text:- Case Sensitivity

DOS – Batch – Error – “was unexpected at this time”

Background Let us pull in real quick and talk about a DOS ditch that is easy to get ensnared in.   DOS-Batch Original Code Output Output - Image Output - Text Revision Outline The error is due to the presence of the ? in the rem statement We have to escape the question ( ? … Continue reading DOS – Batch – Error – “was unexpected at this time”

Windows Powershell ISE:- File Encoding

Background Last week I was trying to get a Powershell code to work. As we have different "environments" this particular script needs to work on at least one machine in each distinct environment.   Command File The script creates extracts each time it runs. I really did not want those extracts to be saved all … Continue reading Windows Powershell ISE:- File Encoding

Windows – Sleep Mode Missing – Workaround

Background On one of my machines, I noticed that the menu option to access the sleep mode is missing.   Proof Image   Workaround Outline powrprof.dll powrprof.dll Outline Access the powrprof.dll Using rundll32, load powrprof.dll Pass along the payload "SetSuspendState Sleep" Syntax Sample Credit Crediting h2Media ( How2Shout ). How to Sleep Windows 10 PC … Continue reading Windows – Sleep Mode Missing – Workaround