Questions tagged as 'linux'

1
answer

Automate permission change tasks

I'm trying to find how to make a script to automate permission changes and then program it with cron. I have created a directory in / home with a group and certain permissions, and I have added the users to that group. As you know, if user...
asked by 22.01.2016 / 00:36
2
answers

Error saving data in a struct

This is how I declare my struct, but at the time of saving it saves twice the data int semaforo; . struct mystruct { char arr[MAXBUF]; }es; struct mystruct *entrada; char g[20]={"11111111111111111118"}; So I save it and print it...
asked by 11.11.2016 / 03:12
2
answers

How to execute a Mysql Script from java in linux?

I'm trying to execute a script .sql generated with MySQL from a java application, I have read and researched different ways to do it and I have found several options (none of which had worked for me) and I found the following block of code : p...
asked by 14.01.2018 / 07:21
2
answers

Set up a linux script to run with the permissions of another user

My specific need is the following: A script of usuario1 has to be able to be executed by any user of group1 (that I know how to do), but when it is executed it has to have the permissions of user1. It would be something equivalent t...
asked by 04.08.2017 / 14:05
3
answers

How to install Git on Kali Linux or Ubuntu?

what would be the lines of code that would have to run as in Kali Linux, as in Ubuntu. how to know if I have git installed in both Ubuntu and Kali Linux. I know that the commands are the same in Kali as in Ubuntu, but I have that little doubt...
asked by 19.06.2017 / 01:05
3
answers

BASH: compare two arrays with IF

I have the following problem: I compare two arrays, the first is a file and the second array stores the previous data from the first array. The idea is that when comparing the arrays a repeated data is not inserted to perform the operation on...
asked by 23.05.2018 / 21:07
1
answer

Integrate Laravel 5 Apache in linux

Good I am trying to integrate laravel and apache but the routes are not recognized by the Apache. Well I show the configuration that I have in the virtutalHost of apache2 I have <VirtualHost *:80> #Alias /loginseg /var/www/html/...
asked by 20.05.2017 / 22:50
2
answers

Operator test in a conditional

I'm starting to make simple scripts in Linux, and I have a doubt when sending parameters to one. The script is as follows: #!/bin/ksh if test $1 -lt $2 then echo "La cadena 1 es menor que la cadena 2" else echo...
asked by 25.07.2017 / 14:40
2
answers

Launch commands from Java

I try to launch a command in Linux with Java with sudo and I can not find the way. I tried the following, but ... even though from the terminal it works, since the execution of my program it does not. public Boolean activarServicio(){...
asked by 30.08.2017 / 21:54
1
answer

Change colors of the ls command in Linux

I would like to change the colors of the ls command in my data partition, since the directories are not very readable from the console. It's a NTFS partition that I share with Windows and my / etc / fstab file contains the followi...
asked by 27.12.2016 / 03:23