I am now doing some tests of my application again corrupted files. But I found it is hard to find test files.
So I'm wondering whether there are some existing tools, which can write random/garbage bytes into a file of some format.
Basically, I need this tool to:
It writes random garbage bytes into the file.
It does not need to know t...
I'm using Ubuntu with Gnome where I can set network proxy settings (with authentication).
The question is: how I can run maven in command line and make it use this proxy?
...
Is there a way, from ssh, to get output back to the shell ssh was invoked from, kind of like :! in vim?
For example, say I'm grepping a file for 'bananas' on a remote server, and I want to copy the output to an IM window - is there a way to invoke pbcopy on my local machine, or am I stuck selecting/copying from the terminal window?
In ...
I have 2 folders:
/var/www/vhosts/mydomain.com/httpdocs/
and
/var/www/vhosts/mydomain.com/httpdocs/duh/
Both folders have the EXACT same perms, group, owner, everything.
If I set $path to the first one, no problems, I echo a list of files with 'html' in the filename.
If I set $path to the second one, it dies on the opendir(). However,...
I have a Python application which needs quite a few (~30) configuration parameters. Up to now, I used the OptionParser class to define default values in the app itself, with the possibility to change individual parameters at the command line when invoking the application.
Now I would like to use 'proper' configuration files, for example...
I recently had some HD issues and had to get a new one. I transferred over my data using Migration Assistant on my freshly imaged disk. Then with but a minute left until I was in the clear, there is a town wide power outage. I was at work and had no backup generator and the university's didn't source the outlets, so my transfer was stopp...
I am preparing an installer with Innosetup. But I'd like to add additional custom (none of the available parameters) command line parameters and would like to get the value of the parameter, like:
setup.exe /do something
check if /do is given, then get the value of something. Is it possible? How can I do this?
...
In PHP I am using proc_open to run a command at the command line.
It needs to open in a new CMD window, so I prepended 'start' to the beginning of the command.
However, it also needs to stay open to display the results, but actually it closes the window automatically afterwards.
I have tried adding 'pause' and also the /k option to 'r...
Hi, I was reading the Windows Commandline Documentation (Win+F1) about the commands that modify the Windows registry, particularly the the "reg add" command.
reg add HKCU\testfolder /t REG_EXPAND_SZ /v Stokrotka /d "%systemroot%\system32"
Now, I don't know how this was designed to work.
When I invoke the command above, the variable %s...
How would one go about specifying short options without their long counterparts in boost?
(",w", po::value<int>(), "Perfrom write with N frames")
generates this
-w [ -- ] arg : Perfrom write with N frames
Any way to specify short options only?
...
Alright, so I've "mastered" the idea of GUI programming in Java and decided I would not touch anything related to windows/linux UI in c++. I've looked at a few UIs programmed in c++ and a few classes already and decided it's not for me. But on that note, what about command line interfaces. I'm currently working on a shipping computer at ...
Hi
I'd need to set timezones of individual processes started on a linux box. I tried setting TZ variable (in the local context), but it didn't work.
Is there a way of running an app from a command line with a different system date to the system one? It might sound stupid, but I need a kind of a sandbox where the system date would be cha...
Two questions pertaining to a FTP Batch upload script I'm working on.
1) My log-in script is failing even though I know my credentials are valid. Any suggestions about this code snippet?
open ftp.mydomainname.com
user (ftp.mydomainname.com:(none)):[email protected]
password:mypassword
2) This is just a general questio...
I have a directory full of image files. I want to move all the .jpg files one directory up
$svn move *.jpg ../
$svn: Client error in parsing arguments
As you can see this approach doesn't work.
If this isnt possible how do I move ALL the files up one directory?
SVN version 1.4.4 on OSX 10.5
...
I am trying to run multiple Nmap commands one after another.
Ideally, each Nmap command will be created in its own command prompt window. The Nmap command will execute and finish. Then another command prompt will appear with the next Nmap command, execute, and so on and so forth.
Unfortunately, the the way the program currently runs,...
Hi I have lots of logfiles with ^[[1m (as vim displays it) in them. I want to watch a logfile life via
tail -n 1000 -f logfile.log | grep <expression-for-escape-sequence>
and only get lines that have bold in them.
I am not sure which grep options I should use and have tried the following already:
tail -n 1000 -f logfile.log | grep "...
I am building a C++ solution with Visual Studio 2005.
Sometimes I open the solution in Visual Studio and build it from within the development environment. Other times I build it from the command line using msbuild.exe. I'm wondering if there is a way that I can determine which of these two types of builds I'm using at compile time (f...
Hi,
I would like to use python for things I've been doing using bash. Is it possible to use the -c switch for long programs, e.g. a for loop with two statements? This would let me use python directly from command line, just like bash or php.
Thanks.
EDIT: Don't know how I missed it, simply doing a python -c ' and then pressing enter do...
Hello!
I'm trying to delete all snapshots except the X newest ones on a Windows AWS instance via the EC2 commandline API tools. I've found the following for Linux... Is it possible to do the same in Windows?
ec2-describe-snapshots | sort -r -k 5 | sed 1,6d | awk '{print "Deleting snapshot: " $2}; system("ec2-delete-snapshot " $2)'
...
I'm trying to build a command-line tool in C# with VS2010.
My question is: how do I debug this, like I would a winforms.
With winforms, I can step through the code, see the values at each individual step, etc...
Here however, the program only responds when I talk to it from the command line. I can't start a debug session, since that wi...