Most voted "linux" questions
For SOFTWARE DEVELOPMENT issues that are specific to the GNU/Linux operating system. Mere use of shell and desktop, installation and support are not within the scope of the site. If your question is not about development or development but has nothing to do with Linux Apis or Linux-specific behavior you should not use this tag, even if you are running on Linux.
Learn more…1,005 questions
Sort by count of
-
3
votes2
answers626
viewsEncrypt ini files
I need a script that Compile a .ini to avoid an easy read. The file should be read with PHP. It seems that C# has a similar feature. The question is how do I do it and then read the .ini with PHP.…
-
3
votes1
answer155
viewsMigration to Heroku
I’m migrating my DB app pro Heroku, the deploy worked: $ git push heroku master When trying to migrate the database according to the command $ heroku run rake db:migrate does not work and returns…
-
3
votes2
answers1140
viewsScript to shut down the computer when closing a particular program
How do I create a script so that when the rdesktop window is closed the computer will be shut down?
-
3
votes1
answer223
viewsConfiguring SVN in Amazon EC2 - User authentication is not requested
I’m having trouble setting up SVN on an Amazon EC2 server managed by Bitnami. I actually created this machine to use Redmine, but I’ll also need the SVN. I followed the instructions on the wiki…
-
3
votes1
answer3262
viewsapache server does not execute. php files
I just installed Apache and PHP on my linux, and All my files . php are showing up this following log error: [Sat Mar 07 12:10:48 2015] [error] [client ::1] PHP Warning: Unknown: failed to open…
-
3
votes1
answer753
viewsRegular expressions with grep
I need to extract data from a text and I’m trying to do this using grep. But the way to make use of regular expressions with this command is quite different from what is usually done in Ruby or…
-
3
votes0
answers889
viewsLinux Script - Find, Copy, Paste and Change Text Files
I have these 3 files: Access.txt: Large text file with row records and columns separated by " ; ". NewAcess.txt: List of new accesses to add. NewUsers.txt: List of new users to add. File Example:…
-
3
votes2
answers666
viewserror message while trying to remove file
When I execute the command root@debian-hy:/var/www/sys# rm teste.txt rm: cannot remove `teste.txt': Operation not permitted Strange because I can edit the file and save, but when I close saw it…
linuxasked 9 years, 6 months ago SneepS NinjA 7,691 -
3
votes2
answers300
viewsCreate virtualhost in windows (apache in Ubuntu)
I’m trying to set up mine apache to access a folder in my HD with windows, have 2 hds on the machine, a ubuntu and the other the windows. The apache already installed, including I have created the…
-
3
votes3
answers906
viewsCreate file with run permission
When I create file .sh, i need to give permission for it to run, is there any file that can be configured or comando applied so that I can already create the file with the permission to run?…
-
3
votes3
answers1056
viewsRedirect "dominio.com.br" to "Subdominio.xyz.com.br"
I have a redirect/pointing problem and I believe it is some incorrect server configuration. I have a VPS (digital Ocean) running Ubuntu14 (terminal) with Apache, PHP5, Mysql. I have full access to…
-
3
votes1
answer260
viewsWhy does a Sort method not work properly on LINUX servers?
I have a question, I have a function to order a array which has names of accentuated persons (UTF-8). It works properly on WINDOWS servers, but when I launch the code to run on LINUX servers the…
-
3
votes1
answer877
viewsCommand to delete all folders except the three most recent
On my application server, I would like to keep a release history of it. However, I don’t want to keep them all, because we rarely have to do rollback for very old releases. Therefore, I would like…
-
3
votes1
answer294
viewsC socket for Linux (how to pass a struct?)
I have a client/server application and need to transfer a struct to the server, but this way is not working: typedef struct{ int pontos; int vidas; int flagReiniciar; int flagAcabar; int…
-
3
votes2
answers108
viewsScript to open index.html from multiple folders
How to make a script in bash that: Based on this example url: http://www.exemple.com.br/1/43530/12620/index.html Select the folder 12620. Open the index.html of this folder in a Firefox tab in Kali…
-
3
votes0
answers2146
viewsC Client server application for file transfer with TCP socket and thread
I would ask for help from the forum to make secure (encrypt) the transfer of a file between two computers. Below follows the C source code of a client-server application for file transfer using…
-
3
votes1
answer235
viewsHow to access hardware on Linux in C?
I am aware of the existence of the Microsoft Win32 API, which allows the programmer to manipulate low-level resources such as serial ports, memories, CPU, GPU, etc. However I work with Linux…
-
3
votes2
answers1346
viewsCaused by: java.awt.Headlessexception: No X11 DISPLAY variable was set, but this program performed an Operation which re
When trying to run a report that contains a fixed image on an Amazon linux server. The exception appears below. Someone has already been through it ? Caused by: java.awt.HeadlessException: No X11…
-
3
votes3
answers7306
viewsCheck if a process is not running and then run it
I need to run a certain command via terminal. However, this command should only be run if the terminal process is not running. If it is running, there is no need to do any other operation. How to do…
-
3
votes1
answer550
viewsShell script function
I have a VM and need to run a script remotely on another VM, example: Script is in VM X and I need to run by X in VM Y. #!/bin/bash IP=$1 if [ $# -ne 1 ]; then echo "informe o servidor $1: " exit fi…
-
3
votes1
answer667
viewsSemaphore and Mutex in C
I have the following problem: A LAN house with 3 pcs, I will insert an X value in the terminal that will be the number of clients arriving in the lan house, customers can only use the Pcs that are…
-
3
votes1
answer326
viewsShow contents of a file by opening the file with the content string of a variable
I have a problem showing the contents of a file using the following command: variavel="Affonso\,\ I.\ P..txt" cat < "$variavel" And running the same command on the terminal but using no variable,…
-
3
votes1
answer229
viewsIDLE: Your Python may not be configured for Tk
I’m trying to use Python in Slackware, in Ubuntu I know how it is, but in Slackware I couldn’t. When I type in the terminal idle to open Python, the following message is displayed: Your Python may…
-
3
votes0
answers189
viewsHow to clone a git repository (BARE) from a Windows7 folder to UBUNTU16.04?
My host system is Windows7 and I have a guest system in virtualbox, Ubuntu 16.04. I shared a folder on Win7 (sf_AA_SHARE_FOLDER) into linux and into it I have another folder called CHM_FINAL_BARE…
-
3
votes1
answer301
viewsError when connecting PHP to SQL Server via ODBC Linux
I am making a connection in no windowns via php to SQL SERVER and it is going normal, in a machine where the php server is linux this giving the following error: Fatal error: Uncaught exception…
-
3
votes1
answer266
viewsSublime Text 3 - Headers autocomplete in the directory
After the failure to search for a plugin in sublime text 3, I come to ask for help. I need to recognize the libs installed on the system, for this I look for a plugin capable of providing an…
-
3
votes1
answer664
viewsWhat is the correct folder permission for linux servers in production?
Reading the manual of PHP and some tutorials I was in doubt about which permission to leave in the folders after uploads of images. Some tutorials tell to leave as 0755, others as 0750, which to use…
-
3
votes4
answers2433
viewsCount the number of times a character appears in a string
I need to count the number of times a character repeats itself in a string. For example: How many times the character / appears in the string down below?…
-
3
votes5
answers628
views -
3
votes2
answers80
viewsParameters for external call
I use Linux and by default (or at least in my case) it does not have screen brightness control, but has a program that gives to control. The point here is that I want to take the "user" value and…
-
3
votes1
answer94
viewsCompare performance of two PHP scripts
I worked on a script PHP, later I found it too complex and heavy and felt the need to simplify it. eliminated some unnecessary functions; simplified some parts of repeated code into functions; I…
-
3
votes2
answers769
viewsSend file to remote server with PHP
I have a PHP system that I developed and put online on my server at Digitalocean, the site has two parts, which visitors will access and the administration area where I manage this site and put the…
-
3
votes1
answer280
viewsHow do I show the path of the php script running under the linux ps command?
How do I find the script path (eg: /var/www/html/script.php ) of PID PHP by the command ps linux? I’m in big trouble, have some PHP script consuming a lot of memory and cpu, when I give the command…
-
3
votes2
answers259
viewsProblems with bash - echo with char ! (exclamation)
I’m trying to pass a password as parameter the password uses numbers after char ! example: root@LinDom:~# senha="teste!123" senha="testevim /etc/hosts" root@LinDom:~# root@LinDom:~# echo ${senha}…
-
3
votes0
answers621
viewsCall to Undefined Function fastcgi_finish_request()
I have a Linux server where php is configured with Nginx + fcgi. The function fastcgi_finish_request works correctly as expected. I have another machine with Windows 10, configured with apache +…
-
3
votes0
answers394
viewsLaravel in Linux with NGINX. Error 500 in browser and Permission denied in log. An analysis and how to solve in the best way possible?
I am installing an application in Laravel 5.4 in a Linux environment Ubuntu 16.04 with NGINX. I have seen that many people (just like me) always come across a 500 error in the browser, just after…
-
3
votes2
answers1773
viewsHow to make code include in Shell Script files
How can I perform the following process: Add the arquivoa.sh and arquivob.sh in the arquivoc.sh, and then perform the defined functions within each file archivoa.sh #!/bin/bash echo "Arquivo A"…
-
3
votes1
answer1850
viewsList network printers with PHP
I need all printers on the network to be listed in my application for configuration purposes, but so far I’m finding it difficult to do. At first I’m using Windows on the application server, but I…
php web-service linux web-application impressionasked 7 years, 7 months ago Anderson Brunel Modolon 1,111 -
3
votes1
answer119
viewsChanging any PHP line gives error 500 (server)
Colleagues. I have serious problems with a certain server, which only happens with it. We have a system from which we changed the directory and all the links are working perfectly and are in the…
-
3
votes1
answer377
viewsWhat are files with extension "Sock" for?
Some applications, such as PHP-FPM and MYSQL, usually use in their settings a file with the extension .sock. I always see this in Linux operating systems. Example: /var/run/mysql/mysql.sock As far…
-
3
votes3
answers451
viewsPermissive issues when creating Linux server folders using mkdir
I have a PHP system using Laravel 4.2 where I use the mkdir command to create a folder in the Storage/pdf directory, the command works in the Windows Dev environment, but when climbing to the UOL…
-
3
votes2
answers255
viewsWHM/Apache + jQuery Ajax Server Configuration
Recently I started having the following problem in my server domains with WHM: When executing an asynchronous AJAX call in the background, I cannot proceed, that is, I cannot access anything else in…
-
3
votes2
answers590
viewsIs 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 a good use Visual Studio 2017 in Windows for such task? I wanted to know the pros and cons, because I saw that the VS…
-
3
votes2
answers219
viewsContainer LAMP with Debian Stretch
I performed some searches on the internet and found no instructions for mounting a LAMP container using the official Debian Stretch image (https://hub.docker.com/_/debian/). The idea would be to…
-
3
votes1
answer1583
viewsHow to create a Cron job?
I have a real estate website that every day we do an XML import of the properties added the day before. This import is done by a component where I choose the file and give import and it runs the…
-
3
votes1
answer193
viewsHow to measure times in multi-threaded C programs
I’m doing a multi-thread work in c, and I need to calculate the time of a certain part of the program, does anyone have any idea how I can do this?
-
3
votes2
answers868
viewsWhat is Port Knocking?
I understand it’s about sending a sequence of requests to a server to unlock a port. It would then be possible through a browser to activate the port for ssh, for example: Access servidor.com:80…
-
3
votes1
answer893
viewsShared memory between Linux C processes (mathematical operations)
I’m studying shared memory in C language and I need to do a simple program so that a shared variable starts with a value and then the program creates a child process where the variable will be…
-
3
votes0
answers48
viewsYou can use different versions of PHP on lampp
I am using linux Manjaro with lampp local server, however the version of my php is 7.2 but I want to use 5.6 to do some tests, my question is if it is possible to do this procedure using lampp ?…
-
3
votes1
answer49
viewsMaximum memory consumption on 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…