Questions tagged as 'linux'

2
answers

Renaming files recursively according to standard given in Linux commands

I'm trying to rename files by replacing certain conforming patterns, but I wanted to do this job recursively and still could not. - / doc | ----- text1.txt | ----- texto2.txt | - / doc2 _ | ----- text1.txt _ | ----- texto2.txt...
asked by 27.10.2014 / 02:07
1
answer

When changing any line of PHP, it gives 500 error (server)

Colleagues. I have serious problems with a particular server, from which only these errors happen. We have a system from which we change the directory and all the links are working perfectly and are in the root directory of the server. We've...
asked by 09.04.2017 / 22:56
2
answers

Is it possible to develop a C ++ application in Visual Studio to run on Linux?

I have to develop an application for Linux in C ++ and wanted to know if it is good to use Visual Studio 2017 on Windows for such a task? I wanted to know the pros and cons, because I saw that VS has an extension for it.     
asked by 15.09.2017 / 15:32
1
answer

Maximum memory consumption in linux bash using openssl with aes

#!/bin/sh SUM = 0 for i in {1..5} do t=$((/ usr / bin / time-f '% e' openssl enc -aes-128-ecb -K 1234567890 -in t -out g 1> /dev/null) 2> &1) SUM = 'bc <<<" $ SUM + $ t "' done res = bc <<< "scale = 4; $ SUM / 5" echo...
asked by 27.04.2018 / 15:30
1
answer

C socket for Linux (how to pass a struct?)

I have a client / server application and I need to transfer a struct to the server, but this is not working: typedef struct{ int pontos; int vidas; int flagReiniciar; int flagAcabar; int matriz[21][19]; } dados; send(sockfd,&...
asked by 14.09.2015 / 07:04
3
answers

Create file with execute permission

When I create file .sh , I need to give permission for it to be executed, is there any file that can be configured or comando applied so that I can already create the file with execute permission?     
asked by 12.06.2015 / 17:15
1
answer

How to do a check in a linux file based on creation time?

I am mounting a backup script and need to create a check to see if any files in a folder were created in the last 7 days, what is the way to do this? I know that the ls -lt command lists the files in the order of last creation or change a...
asked by 09.07.2018 / 19:00
1
answer

PHP run sudo command with shell_exec () [closed]

I have the following problem, I'm trying to run a sh file with php using shell_exec for example: echo shell_exec("./example etc etc"); My problem is that it does not run, is it some permission problem? When I type: php x.ph...
asked by 11.11.2016 / 01:12
1
answer

Command to delete all but the most recent three folders

On my application server, I'd like to keep a history of my releases. However, I do not want to keep all of them, because we rarely have to do rollback for very old releases. So I'd like to know which command to delete all but the latest three...
asked by 03.09.2015 / 16:32
2
answers

Why do not all commands work with pipes?

I'm intrigued that kill and some other commands do not work with pipe. For example, I tried cat /tmp/server.pid | kill -9 and it did not work. Looking for some forums in English I found the solution: kill -9 $(cat /tmp/server.pi...
asked by 23.03.2016 / 13:50