command

What is the difference between find with grep?

情到浓时终转凉″ 提交于 2020-01-22 12:17:31
问题 What is the difference between these command: find . –type f –name '*txt*' and find . –type f | grep 'txt' I tried to run this and there is a difference but I want to know why? 回答1: The Major difference is FIND is for searching files and directories using filters while GREP is for searching a pattern inside a file or searching process(es) FIND is an command for searching file(s) and folder(s) using filters such as size , access time , modification time. The find command lists all of the files

Find PHP version on windows command line

你。 提交于 2020-01-22 04:56:25
问题 I just tried to know version of my PHP from windows command typing, C:\> php -v But it is not working. It says php is not recognized as internal or external command . 回答1: In command prompt type below set PATH=%PATH%;C:\path\to\php Where C:\path\to\php is the folder where your php.exe file is located. After this run C:\>php -v than you will see something like PHP 7.3.6 (cli) (built: May 29 2019 12:11:00) UPDATE: If you find that when you restart your computer, this solution will not work

Difference between IISRESET and IIS Stop-Start command

感情迁移 提交于 2020-01-22 04:33:31
问题 Is there any difference between commands iisreset and iisreset /stop followed by iisreset /start ? 回答1: Take IISReset as a suite of commands that helps you manage IIS start / stop etc. Which means you need to specify option ( /switch ) what you want to do to carry any operation. Default behavior OR default switch is /restart with iisreset so you do not need to run command twice with /start and /stop . Hope this clarifies your question. Check this MS DOS help picture you will understand. 回答2:

execlp multiple “programs”

眉间皱痕 提交于 2020-01-21 15:05:46
问题 I want to run something like cat file.tar | base64 | myprogram -c "| base64 -d | tar -zvt " I use execlp to run the process. When i try to run something like cat it works, but if i try to run base64 -d | tar -zvt it doesn't work. I looked at the bash commands and I found out that I can run bash and tell him to run other programs. So it's something like: execlp ("bash", "-c", "base64 -d | tar -zvt", NULL); If I run it on the terminal, it works well, but using the execlp it dont work. If I use

Running linux commands on java through JSch

自作多情 提交于 2020-01-21 05:18:04
问题 I'm establishing a ssh connection through JSch on java and everything seemed to be working fine, until I tried to run this .sh file. The shell script's name is repoUpdate.sh and it's very simple: echo ' ****Repository update****' echo ' Location: /home/cissys/repo/' echo -e ' Command: svn update /home/cissys/repo/2.3.0' svn update /home/cissys/repo/2.3.0 This is the output I get directly on the linux console with the proper response of the command: [cissys@dsatelnx5 ~]$ repoUpdate.sh ***

How to extract expression matching an email address in a text file using R or Command Line?

爷,独闯天下 提交于 2020-01-20 05:21:48
问题 I have a text file that contains email addresses and some information. I would like to know how can I extract those email address using R or the terminal? I've read that I can used some regular expression that would match an email address such as "^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$" But what command or function shall I used to extract those emails? There are no pattern in the text file. The command or function should just do a search on the document and

How can I call command schedule via url on the laravel?

有些话、适合烂在心里 提交于 2020-01-17 15:25:10
问题 I using laravel 5.6 I set my schedule in the kernel.php like this : <?php namespace App\Console; use App\Console\Commands\ImportLocation; use App\Console\Commands\ImportItem; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { protected $commands = [ ImportLocation::class, ImportItem::class, ]; protected function schedule(Schedule $schedule) { $schedule->command('inspire')->dailyAt('23:00'); } protected

IMAP command to get size of message

落爺英雄遲暮 提交于 2020-01-17 07:44:10
问题 I am looking for the best way to get the sizes of messages using IMAP(i am writing a simple c# lib for myself). Basically a POP3 STAT command equivalent would be good, but it does not exist. I am thinking of fetching the message header and getting the content-length field. Anyone got a better idea or solution? 回答1: Perhaps using the FETCH NNN HEADER is the only way of doing that. Have you checked the spec for FETCH NNN RFC822.SIZE ? Also perhaps a good idea would be to learn from fetchmail

In bash, how do I execute the contents of a variable, VERBATIM, as though they were a command line?

耗尽温柔 提交于 2020-01-17 04:25:12
问题 I need to construct a complex command that includes quoted arguments. As it happens, they are arguments to grep, so I'll use that as my example and deeply simplify the command to just enough to demonstrate the error. Let's start with a working example: > COMMAND='/usr/bin/grep _' > echo $COMMAND /usr/bin/grep _ > $COMMAND foo <- I type this, and grep filters it out. foo_ <- I type this, and..... foo_ <- ... it matches, so grep emits it. "foo" is not echoed back because it lacks an underscore,

How nested tkinter command functions work?

拟墨画扇 提交于 2020-01-16 10:11:50
问题 Code example is from this answer. When click a Button with a command function (and this command function itself will call another menu command function), like the code example, what would happen? When clicking Refresh menu why has lambda command show() not been activated? For clarity, I made some changes about the original code as below: comment out Button().invoke add some print() information and change/add some counting variables # Using lambda keyword and refresh function to create a