unix Questions

7

Solved

I'd like to have a system-wide oh-my-zsh setup, but I'm not sure what would be the "best" approach for this. It is not my intention to ask about personal preferences or the like, I'm just unsure wh...
Slip asked 25/7, 2015 at 8:41

2

Solved

The uname(1) command-line utility has a -m option which prints the "machine hardware name". On Linux, this field comes from the machine member of struct utsname, as populated by the uname(2) syste...
Mosora asked 16/7, 2017 at 5:55

6

Solved

I often use the execv() function in C++, but if some of the arguments are in C++ strings, it annoys me that I cannot do this: const char *args[4]; args[0] = "/usr/bin/whatever"; args[1] ...
Trelliswork asked 10/10, 2008 at 5:6

3

Solved

How can I check whether a memory address is writable or not at runtime? For example, I want to implement is_writable_address in following code. Is it possible? #include <stdio.h> int is_wr...
Henriquez asked 21/1, 2013 at 6:35

2

Solved

Am trying to do a simple file-name match with this below regex which I tested to be working from this page for a sample file-name ABC_YYYYMMDDHHMMSS.sha1 ABC_20[0-9]{2}(0[1-9]|1[0-2])([0-2][0-9]|3...
Tithing asked 3/8, 2016 at 11:52

2

Solved

I am new to socket programming and trying my hand on it on Linux machine (ubuntu) I am unable to understand the option 'SOCK_RAW' and want to learn about it. What is the significance of the 'SOCK_R...
Mecke asked 11/6, 2015 at 11:54

6

Solved

How do you create a unix file format in Powershell? I am using the following to create a file, but it always creates it in the windows format. "hello world" | out-file -filepath test.txt -append ...
Nook asked 24/2, 2011 at 8:27

8

Solved

For grep there's a fixed string option, -F (fgrep) to turn off regex interpretation of the search string. Is there a similar facility for sed? I couldn't find anything in the man. A recommendation ...
Dinge asked 9/11, 2010 at 11:45

7

When I try to use malloc in a kernel module I get an error message from the compiler. My code: res=(ListNode*)malloc(sizeof(ListNode)); The compilers error message is: /root/ex3/ex3mod.c:491: e...
Unbalance asked 22/5, 2010 at 14:22

17

Solved

At work (a mostly Unix development shop), I've had an OS X box for the past 1.5 years and a Linux box before that. Due to various circumstances, I'll be getting a Windows XP laptop in the next few ...
Nightmare asked 12/9, 2009 at 5:35

10

Solved

I am writing one shell script and I want to get PID of one process with name as "ABCD". What i did was : process_id=`/bin/ps -fu $USER|grep "ABCD"|awk '{print $2}'` This gets PID of two processe...
Narva asked 6/6, 2013 at 14:42

3

supervisor.sock refused connection in docker container I have tried to fix it by supervisorctl unix:///var/run/supervisor.sock refused connection AND Overlayfs does not work with unix domain socke...
Maghutte asked 3/5, 2017 at 7:13

11

Solved

I am getting a stream of numbers in a pipe, and would like to perform some operations before passing them on to the next section, but I'm a little lost about how I would go about it without breakin...
Homologous asked 17/7, 2010 at 16:1

4

I am trying to do a CURL with an IF Else condition. On success of the call Print a successful message or else Print the call failed. My Sample Curl would look like: curl 'https://xxxx:[email&#160...
Revenue asked 11/8, 2016 at 20:23

3

Solved

I am beginner to awk. I have created one file which contains employee information. There are employees in different departments. And i wanna count that how many employees in each department. like ...
Philis asked 27/9, 2016 at 11:39

4

Solved

If I hexdump file.txt then I only get the hex vaules. Would it be possible to show both hex and ASCII in text mode just like a GUI hex editor?
Thirzi asked 1/5, 2014 at 21:16

2

I am doing a study about Unix domain socket. Especially about how does it work. I googled many times with many keywords but the results are all about API, system calls, how to use it, examples ... ...
Condorcet asked 17/2, 2013 at 8:50

6

Solved

I am aware that it is not possible to echo the * while you type in standard ANSI C. But is there a way to display nothing while someone is typing their password in the console. What I mean is like ...
Overhand asked 14/4, 2010 at 0:53

5

Solved

How can I change the $PATH variable in Debian? I tried to change /etc/profile but this affected only normal users (and yes, I added path to BOTH user's and root's paths). After that I tried to edi...
Caroleecarolin asked 31/8, 2011 at 13:47

4

Solved

Suppose we are doing a multiline regex pattern search on a bunch of files and we want to extract the matches from grep. By default, grep outputs matches separated by newlines, but since we are doin...
Vimen asked 17/3, 2016 at 16:33

4

Solved

What would be the best way to kill all the processes of a parent but not the parent? Let's say I have an undetermined number of child processes that I've forked and on a given alarm, in my signal h...
Keenakeenan asked 25/8, 2013 at 20:52

3

Solved

How can I diff two files and ignore lines starting with a sequence. E.g File1: abc def time:123 File2: igh def time:345 With unix diff it will report <time:123 >time:345 I want to i...
Selah asked 30/4, 2010 at 19:26

4

My PATH and JAVA_HOME are defined in ~/.bashrc. However, when I launch Intellij from my Favorite icon and then launch a Maven Run Configuration, these variables are not thus defined. But if directl...
Heteroecious asked 20/5, 2019 at 18:8

3

Solved

I've been looking for the equivalent python method for the Unix cksum command: http://pubs.opengroup.org/onlinepubs/7990989775/xcu/cksum.html $ cksum ./temp.bin 1605138151 712368 ./temp.bin So far...
Wallsend asked 26/7, 2011 at 19:24

21

Solved

Sending a message from the Unix command line using mail TO_ADDR results in an email from $USER@$HOSTNAME. Is there a way to change the "From:" address inserted by mail? For the record, I'm using G...
Cardon asked 10/9, 2008 at 17:8

© 2022 - 2025 — McMap. All rights reserved.