command

Extracting jar to specified directory

你离开我真会死。 提交于 2019-12-02 17:48:54
I wanted to extract one of my jars to specified directory using jar command line utility. If I understand this right -C option should to the trick but when I try jar xvf myJar.jar -C ./directoryToExtractTo I am getting usage information from my jar utility, so I am doing something wrong. Is the thing I want achievable with jar or do I need to manually move my jar and there invoke jar xvf myJar.jar It's better to do this. Navigate to the folder structure you require Use the command jar -xvf 'Path_to_ur_Jar_file' Amit Maniar jars use zip compression so you can use any unzip utility. Example: $

Run a command at a specific time

隐身守侯 提交于 2019-12-02 17:36:23
I'm trying to run a command at a specific time. I've looked at the "at" command, but I don't know how to get it working... Here's what I do: at 1843 (Enter) php /run/this/script.php (Ctrl+D) But how do I do this in a bash script? I mean, I need to press enter and "Ctrl+D" to set up the delay... How to do this in a script? Any suggestions most welcome. Thanks in advance, You could try this: at 1843 <<_EOF_ php /run/this/script.php _EOF_ edit if what you want to do is run Firefox, try this: at 1843 <<_EOF_ DISPLAY=:0.0 /usr/bin/firefox _EOF_ You can echo your command into at as input: echo "/usr

Executing viewmodels command on enter in TextBox

独自空忆成欢 提交于 2019-12-02 17:23:36
I want to execute a command in my viewmodel when the user presses enter in a TextBox. The command works when bound to a button. <Button Content="Add" Command="{Binding Path=AddCommand}" /> But I can't bring it to work from the TextBox. I tried an Inputbinding, but it didn't work. <TextBox.InputBindings> <KeyBinding Command="{Binding Path=AddCommand}" Key="Enter"/> </TextBox.InputBindings> I also tried to set the working button as default, but it doesn't get executed when enter is pressed. Thanks for your help. I know I am late to the party, but I got this to work for me. Try using Key="Return"

“fatal error encountered during command execution” when trying to add a view from MySQL DB

半腔热情 提交于 2019-12-02 17:23:08
问题 I'm trying to add some tables and views from a MySQL database to a project in VS2005. After a lot of looking around I ended using the ADO.NET connector, which works pretty fine, except when trying to add a View with the Data source configuration wizard, where I get the "fatal error encountered during command execution" error message, and when I try adding one with the query builder, where it doesn't show me the name of the columns at the diagram pane. If I add all the SELECT commands by hand,

Emacs repeat string n times

自古美人都是妖i 提交于 2019-12-02 17:13:21
I'm learning the basics of navigating/editing in Emacs and I'm curious how one could accomplish the following task: Repeat the string 'bla ' n times in normal text editing mode. Let's say I want to repeat it five times to generate 'bla bla bla bla bla '. I tried... C-u 5 bla ...but the command executes after the 'b' is entered, and I only get 'bbbbb'. I'm sure there's some basic command that can help me here...would somebody be kind enough to enlighten me :)? One way is via a keyboard macro : C-x ( bla C-x ) C-u 4 C-x e You can also just insert the repeat count before the macro termination: C

Execute commands with notepad++

梦想与她 提交于 2019-12-02 17:08:44
How can I specify the actual file to process using the Run command in Notepad++. I want for example run pdflatex using the actualfile as input, or the cs compiler, etc. Using the entire path isn't practical, it must works with any actual file. You can automatically add the current file using a variable in the execution string: C:\temp\test.exe "$(FULL_CURRENT_PATH)" The list of available variables is nowhere documented, but you can see it in the source code. FULL_CURRENT_PATH CURRENT_DIRECTORY FILE_NAME NAME_PART EXT_PART CURRENT_WORD NPP_DIRECTORY NPP_FULL_FILE_PATH CURRENT_LINE CURRENT

Executing commands by using Telnet in C# [duplicate]

自作多情 提交于 2019-12-02 16:51:57
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: C# Telnet Library I wish to do telnet programatically using C# so that once I establish the connection to the server, I can execute the commands like ls, ls -l, mv, rm.. etc on the server. Is it possible? Are there classes in C# for this purpose similar to the classes for FTP (FtpWebRequest)? If yes, please direct me to the right approach. When I execute ls , I need the list generated on server to be sent to the

Using find command in bash script

笑着哭i 提交于 2019-12-02 16:19:38
I just start to use bash script and i need to use find command with more than one file type. list=$(find /home/user/Desktop -name '*.pdf') this code work for pdf type but i want to search more than one file type like .txt or .bmp together.Have you any idea ? Welcome to bash. It's an old, dark and mysterious thing, capable of great magic. :-) The option you're asking about is for the find command though, not for bash. From your command line, you can man find to see the options. The one you're looking for is -o for "or": list="$(find /home/user/Desktop -name '*.bmp' -o -name '*.txt')" That said

Unix Command to List files containing string but *NOT* containing another string

给你一囗甜甜゛ 提交于 2019-12-02 16:15:44
How do I recursively view a list of files that has one string and specifically doesn't have another string? Also, I mean to evaluate the text of the files, not the filenames. Conclusion: As per comments, I ended up using: find . -name "*.html" -exec grep -lR 'base\-maps' {} \; | xargs grep -L 'base\-maps\-bot' This returned files with "base-maps" and not "base-maps-bot". Thank you!! Try this: grep -rl <string-to-match> | xargs grep -L <string-not-to-match> Explanation: grep -lr makes grep recursively (r) output a list (l) of all files that contain <string-to-match> . xargs loops over these

How to deploy war file to tomcat using command prompt?

自古美人都是妖i 提交于 2019-12-02 16:14:35
I have created a war file and put into tomcat/webapps . How to deploy a war file to tomcat using command prompt? First add a user role in tomcat-users.xml for role manager-script. Then to undeploy current app you can use wget http://username:password@localhost:portnumber/manager/text/undeploy?path=/appname -O - -q To deploy wget http://username:password@localhost:portnumber/manager/text/deploy?path=/appname&war=file:/warpath -O - -q The earlier answers on this page are correct that you can copy/move the WAR file into place and restart tomcat, but they omit to mention something: you must remove