Search Results

Search found 28350 results on 1134 pages for 'command switch'.

Page 41/1134 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • Command line solution for removing parts from a binary file?

    - by zsero
    I have a binary file and I would like to remove parts from. By removing I mean deleting those parts and thus making the file's size smaller. The parts would be between two ASCII strings. So, for example the file would look like this ........ start ABCD end ..... start EFGH end ..... start IJKL end ........... So in this file, I would like to search for strings "start" and "end" and remove the parts between them. The way I think I can do it is to lookup all the locations for "start" and "end" calculate ranges from that delete those parts Now I am using some GUI based Hex editor and I use the "Search All", "Select Range" and "Delete" commands, but I am sure it would be possible to solve it using some powerful command line hex/text editors. Do you know any solution for this problem which doesn't require using a GUI for looking up, copy & paste on clipboard, select range and delete commands but is just a few lines of command line? I am interested ini both Linux shell scripts or using some command line hex editors under Windows, or even Python scrips are welcome. Do you think it is possible to solve this problem just by a simple Regex replace? Are there any regex replace util which handles binary files well?

    Read the article

  • Bind a key to a commandline command in Mac OS X?

    - by Stefan Lasiewski
    I have a Mac Powerbook running Leopard (10.5.8). Does Leopard provide an easy way to bind keys to commands which are typically run on the commandline? For example, I can open up Terminal.app and run the command /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine which will activate the screensaver and lock my screen. What if I want to bind 'Apple-key L' to this command and execute this globally, regardless of which application is in use at the moment? Can I do this, or can I only run ScreenSaverEngine from a Terminal window? I tried to set up global keyboard shortcuts, but it seems that this won't allow me to bind a key to an arbitrary shell command: Note: You can create keyboard shortcuts only for existing menu commands. You cannot define keyboard shortcuts for general purpose tasks such as opening an application or switching between applications. I tried to set up a application keyboard shortcut, but commands like ScreenSaverEngine don't seem to be an application. Note that this Screensaver/Lock screen is just one example. I have come across other nifty commands which I might want to bind to a key-combination as well. I can do this in Gnome and Windows (with varying success). How about with Leopard? Should I be looking at doing this with AppleScript? (I haven't used that since the Hypercard days ...)

    Read the article

  • how to switch to another window when Ctrl + B not works for tmux?

    - by hugemeow
    as we all know tmux is quite nice tool, but there is some scenerios that Ctrl + B cannot be used for example: i sshd to server A, and now i connect to A's tmux pty, so Ctrl + B is captured by server A. then i ssh to server B from server A, and there is also tmux running on Server B, this time, Ctrl + B only works for server A, and cannot be used by server B, so if i want to switch windows for server B, what should i do then?

    Read the article

  • How to enable bluetooth when there is no hardware switch

    - by Robert Mutke
    My laptop Thinkpad Edge e320 got out of standby with bluetooth and wireless disabled. WiFi got enabled normally in unity but bluetooth says that "bluetooth is disabled by hardware switch". There is no hw switch on my laptop. I tried: # echo 1 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable bash: echo: write error: Operation not permitted but as you see no results. Fn-F9, which is radio control, does not work. Any help?

    Read the article

  • How to automatically switch monitors with my laptop dock

    - by Cas
    I have a Dell Precision M4300 with a Dell Dock PRO1X running Ubuntu Natty. When I have the laptop docked the lcd display is off and I use two external monitors however when I undock the laptop it does not switch to the laptop screen. The same happens when I dock the laptop, it does not switch to the external monitors. If I reboot the laptop it will choose the correct setup but it will not automatically change monitors with Ubuntu running. My Xorg.conf

    Read the article

  • Preserve permission switch not working with cp?

    - by Ankit
    Copying file from other user's directory with '-p' switch should reserve the permission as per the man page. I am copying /etc/passwd to my home directory with -p switch but the permissions aren't preserved as follows:- ijoin@stream:~$ ls -l /etc/passwd -rw-r--r-- 1 root root 1813 Sep 25 08:58 /etc/passwd ijoin@stream:~$ cp --preserve /etc/passwd . ijoin@stream:~$ ls -l passwd -rw-r--r-- 1 ijoin ijoin 1813 Sep 25 08:58 passwd I am doing something wrong?

    Read the article

  • Best design for a "Command Executer" class

    - by Justin984
    Sorry for the vague title, I couldn't think of a way to condense the question. I am building an application that will run as a background service and intermittently collect data about the system its running on. A second Android controller application will query the system over tcp/ip for statistics about the system. Currently, the background service has a tcp listener class that reads/writes bytes from a socket. When data is received, it raises an event to notify the service. The service takes the bytes, feeds them into a command parser to figure out what is being requested, and then passes the parsed command to a command executer class. When the service receives a "query statistics" command, it should return statistics over the tcp/ip connection. Currently, all of these classes are fully decoupled from each other. But in order for the command executer to return statistics, it will obviously need access to the socket somehow. For reasons I can't completely articulate, it feels wrong for the command executer to have a direct reference to the socket. I'm looking for strategies and/or design patterns I can use to return data over the socket while keeping the classes decoupled, if this is possible. Hopefully this makes sense, please let me know if I can include any info that would make the question easier to understand.

    Read the article

  • Command Query Separation

    - by Liam McLennan
    Command query separation is a strategy, proposed by Bertrand Meyer, that each of an object’s methods should be either a command or a query. A command is an operation that changes the state of a system, and a query is an operation that returns a value. This is not the same thing as CQRS, hence why I think that CQRS is poorly named. An Example of Command Query Separation Consider a system that models books and shelves. There is a rule that a shelf may not be removed if it holds any books. One way to implement the removal is to write a method Shelf.Remove() that internally checks to make sure that the shelf is empty before removing it. If the shelf is not empty then it is not removed and an error is returned. To implement this feature following the principle of command query separation would require two methods, one to query the shelf and determine if it is empty and a second method to remove the shelf. Separating the query from the command makes the shelf class simpler to use because the state change is clear and explicit.

    Read the article

  • Switch between apps with keyboard only (not ALT+TAB or SUPER+<number>)

    - by brejoc
    I'm looking for a way to switch between Apps with the keyboard only and not limited to some applications by defining shortcuts. Gnome3 offers the possibility to switch to (or start) an application by typing the app name. KDE allows this with krunner. The application lens in Unity does not offer this at all: https://bugs.launchpad.net/ayatana-design/+bug/1027792 Is there now way to master this very basic and handy functionality with Unity?

    Read the article

  • Is there an RSM replacement in Windows 7? (to eject USB and Firewire devices from command line)

    - by Jay
    I know Windows XP and previous had an rsm.exe file in the <root>\windows\system32 folder that could be used to manage media. I used this command in batch files and from the command line to eject external disks (iPod, CF cardreader, etc.). This utility appears not to be included in Windows 7, and I wonder if there is some replacement utility that will allow the same thing. I've been unable to find any such thing. I'm aware of the 3rd party utilities; this question is only about what is included with Windows 7.

    Read the article

  • How to get my external IP address (over NAT) from the Windows command-line?

    - by Diogo Rocha
    The Windows "ipconfig" command can only show me the parameters from the Ethernet interfaces from my machine (even with the "ipconfig /all" argument). It can show detailed information about the interface, but it will never show me my external IP address over a NAT network. However, there are several websites, such as "What is my IP address" that can get and show my external IP address. So I'm wondering, is possible to get this value externally? Should I expect that there is some way to get this information from a command line at my local machine... I need to get this value to log on an application that I'm doing with VBScript. There is some way to do this, from a "cmd" on Windows?

    Read the article

  • Is bonding mode=5 a solution against MAC flapping?

    - by Yuri
    There is two are interconnected Cisco WS-2950T. By the one GBIC port on first switch connected a first NIC of bonding interface, and by the one GBIC port on second switch connected a second NIC of bonding interface. Of course the both switches sees the bonding MAC-address only on one interface (eg it is GBIC on first switch) and all incoming traffic for bonding interface passes through this GBIC. But in "mode=5" all outgoing traffic are distributed between the all interfaces that make bond. In this case, the packets will be dropped from the second switch and anyway will going through the first switch? Or the division will be working?

    Read the article

  • How to get my external IP address(over NAT) from Windows command-line?

    - by Diogo Rocha
    Windows "ipconfig" command can only show me the parameters from the ethernet interfaces from my machine(even with the "ipconfig /all" argument), it can show detailed information about the interface, but will never show me my external IP address over a NAT network. However, there are several websites, such as "What is my IP" that can get and show my external IP addres. So I'm wondering, if is possible to get this value externally, should I expect that there is some way to get this information from a command line at my local machine... I need to get this value to log on an application that I'm doing with VB Script. There is some way to do this, from a "cmd" on Windows?

    Read the article

  • DELL switch 6248 port and mac mapping using SNMP

    - by Brad
    I have a Dell 6248 switch. I connect some of my servers to it and want to know which server nic connected to which switch port. I try using snmpwalk to get this information, but I just can get mac/ip mapping of my server nic from switch, I still can't get which switch port it connect. I try a tool named Managed Switch Port Mapping tool, it can show which switch port is connected to which nic/ip. I use WireShare to get all snmp packets but still can't find what's the snmp oid to get this information. Anyone knows how to get this?

    Read the article

  • How to install gnome desktop from dvd on Centos 6 using command line?

    - by alwbtc
    I have installed Centos 6 to Virtualbox. Although I have chosen to install General Purpose Gnome Desktop, Gnome desktop does not start. All I get is a black and white text prompt. I would like to know how I can install Gnome Desktop from Centos dvd iso image? How do I mount the dvd image to virtual machine linux? How do I install Gnome desktop from command line? If I already have Gnome Desktop installed, why doesn't it start? How can I check from command line that I have Gnome installled? This virtual machine does not have internet connection, that's why I want to install the Gnome Desktop from dvd. Best Regards

    Read the article

  • How can I style the command being entered in a bash prompt?

    - by C4H5As
    While watching this intro video to Brunch, at about t=1:30 the command prompt being used has some very cool styles. The part I'm interested in is how the presenter managed to colour the text being entered on the prompt, while it's being entered. It looks like the first argument is coloured green when it becomes a valid executable command & purple when it's invalid. Successive arguments appear white, though it looks like a valid file path gets an underline (see ~ t=2:01). What's the trick here? Is this a custom terminal emulator? Is it some kind of magic $PS1?

    Read the article

  • How to redirect the output of the vmrun listProcessesInGuest command on windows?

    - by mark
    I run vmrun.exe with listProcessesInGuest on the command line and get the list of processes displayed in the console window. The exact command line is: "C:\VIX\vmrun.exe" -T vc -h "https://myserver/sdk" -u "mydomain\myuser" -p 123 -gu Administrator -gp 123 listProcessesInGuest "[Storage1] QA-W-7-SP1-64-0/QA-W-7-SP1-64-0.vmx" It works fine. Now I wish to redirect the output, however, neither 2> nor 1> work! The former has no effect - the output is still displayed in the console window, so I conclude it is send to stdout. But the latter does not work too - now nothing is displayed in the console window, but the redirection file is empty! It is created all right, but it has the zero size! Can someone explain what is going on?

    Read the article

  • How to open the Quota Entries list for a given drive from a shortcut or command line?

    - by Indrek
    Is it possible to open the Quota Entries list for a given drive from a shortcut or the command line in Windows? And if so, how? I'm not talking about managing quota entries from the command line (fsutil quota), I'm looking for a way to get directly to the Quota Entries GUI rather than going through My Computer → right-click on a drive → Properties → Quota tab → Show Quota Settings → Quota Entries... I managed to find out (using Process Explorer) that the backend process is dllhost.exe, and the DLL in question should be dskquoui.dll, so it should be possible to run it directly with rundll32.exe, but I'm not sure of the exact syntax. Any ideas?

    Read the article

  • Switching to open folders on a Mac

    - by Charles
    How do I easily switch to an open folder on a Mac? In Windows, which I'm used to using, I can see all my opened folders in my vertical taskbar, all I need to do to switch to another window is click on the folder in the task bar. There's no taskbar on a Mac, and when I have a lot of folders opened, ie. lots of Finder windows, how can I switch between them? The way I'm doing it is, I put expose on an active corner and switch that way. However that's still damn hard, because first I have to bring up expose, and then find my window. The folders are placed in a random position between opened apps, the folders are not in a list, and on a big screen I have to scan the whole screen in order to find the one I want... etc. Is it really this hard just to switch to a different folder on a Mac? Is there a taskbar solution on a Mac?

    Read the article

  • How can I convert an OpenOffice document to PDF from the Linux command line?

    - by Norman Ramsey
    I have students who, when asked for PDF, sometimes hand me an OpenOffice document or spreadsheet. file(1) can identify these documents, but I've been unable to discover how to convert them to PDF using the command line. (The man page for ooffice(1) lists an option to print a document but not to convert to PDF.) Google is unhelpful, except for giving me the uneasy feeling that this can't be done without a nifty script in a language I don't know against an API whose documentation I can't find. Can anyone help me solve the problem of converting an OpenDocument to PDF using only the Unix command line?

    Read the article

  • Terminal command to send data (plain text string) to a port at a remote computer.

    - by Eddy
    I am trying to send data (plain text string) to a port at a remote computer using terminal utility. The string would be used to trigger something on the remote computer running a program that would listen to that specific port. I used netcat command and tried a few combination of the following but can't seem to get the parameter right. Can someone point me out where am I doing wrong? eddy-2:Desktop eddy$ nc IPADDRESS PORT woc.txt eddy-2:Desktop eddy$ nc IPADDRESS PORT < woc.txt P.S: woc.txt contains plain text string of the said command. Edit: I am trying to send a string from OSX to Windows XP where the specific port is open by default.

    Read the article

  • How to enter a bash script at the command line, but not process the script until the entire script h

    - by MHGL
    I am performing some interactive testing using HP's QuickTest Professional and Linux. I am connecting via SSH and feeding the BASH script lines directly into the command line. The problem I'm having is that the script executes as it is entered. I'm attempting to find a way that I can feed the script to the command line, but save execution until the entire script is complete. Anyone have any experience around doing this? I'll admit, it isn't the ideal way to perform this, but it's what I'm faced with at the moment. Any other suggestions are welcome. Thanks!

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >