Questions tagged as 'linux'

1
answer

Integrate samba4 server with microsoft active-directory

I have a windows server 2003 server running as a domain controller, I have accounts, groups, etc. all right and running right there. Here's a warning from microsoft that server 2003 will no longer be supported by microsoft as everyone should...
asked by 29.06.2015 / 22:53
5
answers

How to list files in a directory and subdirectories that contain a specific text in Linux? [closed]

How to list all the files in a directory and subdirectories that contain a specific text and along the corresponding line in which the text appears in Linux?     
asked by 29.01.2014 / 20:32
1
answer

What is the xargs command for?

What is the xargs ? For example, I've seen examples ls pasta/ | xargs -l git update-index I saw that this was being used because the git update-index command does not work with folders. But in practice, I do not know wha...
asked by 21.03.2016 / 20:38
3
answers

print of char returns random character

Compile the code below without error. When I enter the word (or phrase), printf returns a random character like 0 � a etc. The program should read a word (or phrase) and printf show the word (or phrase) that was written b...
asked by 03.11.2017 / 02:36
2
answers

Create files in the Home folder with C ++

In c ++, creating files is very simple, just include the fstream library and use ofstream arquivo; file.open ("variables.txt"); However this generates the file in the project folder and I would like to generate the file in some other fol...
asked by 19.04.2018 / 01:53
2
answers

What does -rf after rm mean? [closed]

I have a command in SSH on the Magento platform (installed on an Apache server) to delete the contents of the rm -rf path/to/folder/* cache folder but I'm not really sure for sure what -rf means.     
asked by 13.04.2016 / 22:07
2
answers

Execute the TOP command in exec in C - Linux?

Updated code, it does not execute commands #include <stdlib.h> #include <unistd.h> #include <stdio.h> void ExeclLS(int argc, char **argv) { char *args[] = {"ls", "-aF", "/", 0}; char *env[] = { 0 }; print...
asked by 07.03.2016 / 15:03
2
answers

How to rotate a bash file "mytest.sh" to a MAC without using "./", using aliases and in a global way?

I have a mytest.sh file that will be distributed among other users (all with mac). I want to know what has to be done so they can run the script from this file, from anywhere (in a global way) without having to use ./ and sweating...
asked by 20.11.2017 / 17:11
2
answers

What command to list files starting with "a" and ending with "v"?

I have an a.txt file that inside it has adsaadv I would like to look in addition to other files starting with a and ending with v. I thought of using the grep something like, grep "^ [a-v $]" a.txt However, I did not succeed, do I have to...
asked by 07.04.2016 / 21:49
3
answers

Validate zip code in Shell-Script

I am entering this world of regular expressions, I am with a doubt, I read about the metacharacters, etc. Well, I'm trying to validate a zip code and I'm using the following command and I'm not getting it ... I've already replaced \ d with [0-9]...
asked by 17.06.2015 / 15:22