The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    any linux pros out there

    Discussion in 'Linux Compatibility and Software' started by Mobius 1, Apr 21, 2013.

  1. Mobius 1

    Mobius 1 Notebook Nobel Laureate

    Reputations:
    3,447
    Messages:
    9,069
    Likes Received:
    6,376
    Trophy Points:
    681
    This is a command to flip bit 16 from from 0 to 1, it's for firefox so that the cache is retained after a crash/improper shutdown


    Code:
         echo -e "\x00" | dd of=_CACHE_MAP_ bs=1 seek=15 count=1 conv=notrunc 

    Is there any way that I can use it in windows? Or how I can write a .bat/registry tweaker to utilize this command in windows7?

    Thanks!
     
  2. Falco152

    Falco152 Notebook Demon

    Reputations:
    442
    Messages:
    1,882
    Likes Received:
    75
    Trophy Points:
    66
    The most easiest way I believe is just install cygwin bash.

    Just add the path to cygwin binaries to your path.
    In your bat, call bash to execute that statement.

    Unfortunately, I don't remember the tag off the top of my head but you can man bash for that.

    Edit:
    I took at my scripts ... I basically cheated by creating two shell script, 1 bat and 1 bash shell, where the bat calls the bash to call on the shell script.

    Example.

    inside something.bat
    sh hello.sh
     
  3. Mobius 1

    Mobius 1 Notebook Nobel Laureate

    Reputations:
    3,447
    Messages:
    9,069
    Likes Received:
    6,376
    Trophy Points:
    681
    I may sound like a noob, but I don't understand anything :|

    Is the code I posted incomplete?
     
  4. Falco152

    Falco152 Notebook Demon

    Reputations:
    442
    Messages:
    1,882
    Likes Received:
    75
    Trophy Points:
    66
    I'm assuming your code is a complete valid statement.

    Here's a breakdown ... My English isn't too good anyways :)

    Download and install Cygwin. Default settings should be enough ... just watch out for where the temp download directory during the install.

    Add x:\<path to Cygwin>\bin to your windows PATH environment variable ... example XXXX;C:\Cygwin\bin

    Make a foo.bat file and make a bar.sh file. Make sure they are in the same directory.
    Bat File:
    sh bar.sh

    SH File:
    #!/bin/bash

    echo -e "\x00" | dd of=_CACHE_MAP_ bs=1 seek=15 count=1 conv=notrunc
    exit
     
  5. Mobius 1

    Mobius 1 Notebook Nobel Laureate

    Reputations:
    3,447
    Messages:
    9,069
    Likes Received:
    6,376
    Trophy Points:
    681
    i see, i will try it.

    what commands should i use to flip bit 16 to (0) value? (artificial crash)
     
  6. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    I haven't used cygwin in a while, so I have no idea if dd will actually do what you want it to in that case. It's worth a shot.

    Why not just hex edit it? Do you *need* to do it with a batch script?
     
  7. Mobius 1

    Mobius 1 Notebook Nobel Laureate

    Reputations:
    3,447
    Messages:
    9,069
    Likes Received:
    6,376
    Trophy Points:
    681
    I have no idea what I have to do.

    Is there a difference between cygwin and the hex editor?
     
  8. Falco152

    Falco152 Notebook Demon

    Reputations:
    442
    Messages:
    1,882
    Likes Received:
    75
    Trophy Points:
    66
    A hex editor is an editor that allows to modify content according to memory alignment.

    Nice suggestion :) Simpler and much elegant than mine.

    Cygwin and a hex editor are not related at all.

    The simple way to think Cygwin is like a repository of tools and libraries to bring a linux like environment even the desktop to Windows.
     
  9. Mobius 1

    Mobius 1 Notebook Nobel Laureate

    Reputations:
    3,447
    Messages:
    9,069
    Likes Received:
    6,376
    Trophy Points:
    681
    Which one is bit 16?

    [​IMG]
     
  10. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    0x0f - last bit on the first line. That looks like an executable file?
     
  11. Mobius 1

    Mobius 1 Notebook Nobel Laureate

    Reputations:
    3,447
    Messages:
    9,069
    Likes Received:
    6,376
    Trophy Points:
    681
    Doesn't seem to work, I'm not sure if I'm modifying the right bit but the guy at firefox forums also said that "FF FF 00 0x" line is supposed to be changed
     
  12. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    You're doing it on the _CACHE_MAP_ file in your firefox profile folder, right?