Questions tagged [linux]

61741 questions
1

votes
1

answer
637

Views

Creating irremovable files in Linux [closed]

What is the chmod setting to make files removable only by the root user? Does there exist a chmod setting that would prevent the root user from removing the file without altering its permissions again/
Si Chen
1

votes
2

answer
2.7k

Views

Undefined references everywhere, while trying to compile BluezTools?

I'm trying to compile BluezTools using the following command: ./autogen.sh && ./configure && make Here is a snippet of the output: obextransfer.c:(.text+0x4d5): undefined reference to `g_type_check_instance_cast' obextransfer.c:(.text+0x4f1): undefined reference to `dbus_g_proxy_disconnect_signal' o...
JL.
1

votes
2

answer
3.4k

Views

How to filter Packets in RAW socket in LINUX

RAW Socket: How to filter packets in RAW Socket ? I was trying to capture UDP packets in a server Program but its receiving all the packets. Is there any function or command to filter the packets in linux.
Rocoder
1

votes
2

answer
1.4k

Views

Downloading all Urls accessible under a given domain with wget without saving the actual pages?

Trying to determine all the valid urls under a given domain without having the mirror the site locally. People generally want to download all the pages but I just want to get a list of the direct urls under a given domain (e.g. www.example.com), which would be something like www.example.com/page1...
fccoelho
1

votes
1

answer
230

Views

scrollback <num> not working screen

I use screen with putty and have configured scroll-back buffer to a large number but I'm unable to scroll up. What I have tried already: As given in this question I tried setting defscrollback 10000 in .screenrc but that doesn't seem to reflect a change. I have also tried exiting putty, closing all...
Aman Deep Gautam
1

votes
1

answer
448

Views

Memory debugger for linux kernel

Is there any memory debugger for linux kernel? We have issues with "NULL pointer dereference" kernel oops among other crashes on android/linux arm based hardware. Thanks
user1804788
1

votes
1

answer
82

Views

Logs are written asynchronous to log file

I have come across strange scenario where when I am trying to redirect stdout logs of perl script into a log file, all the logs are getting written at the end of execution when script completes instead of during execution of the script. While running script when I do tail -f "filename", I could able...
lazyboy
0

votes
0

answer
5

Views

File locks from fcntl to sync dylibs in same host

I am writing a series of plugins for a 3rd party OSX host application, who will have to communicate with each other via shared memory. Each will be located in it's own dylib, and they will thus all be loaded into the same host process. Or not, depending on whether there's one or more host processe...
Carl Colijn
1

votes
0

answer
8

Views

Allwinner A13 hang on boot and return “SPL:Unsupported Boot Device!” error

I am new in here and I am sorry my bad English. I have OLinuXino A13 board. I endeavor kernel and boot events. So I try boot OLinuxino-A13 via spiflash(in FEL mode). I connected board to my PC(USB OTG). I Sending commands from my computer for writing to spiflash. And differently I build second conne...
SametGen
1

votes
1

answer
45

Views

Library required when moving to another pc

I have done a simple C program that copies files from ftp using curl library. I have done it on Ubuntu linux machine and now I would like to distribute it to Debian and Ubuntu PC's. I'm planning to copy output file to these machines. What other files need to be coppied to these PC'? Do I need to ins...
vico
1

votes
2

answer
281

Views

ImageMagick: Possible to remove middle in picture?

Question As an example, is there an easy way to crop away the o's in the Google logo (knowing their coordinates in advance)? The result should then be "Ggle" with a smaller image width than the original because the o's are missing. It doesn't have to be done with ImageMagick. It could also be Gimp,...
Sandra Schlichting
1

votes
3

answer
1.7k

Views

Difference in struct sizes when #pragma pack(1) is used on Solaris and Linux

I am finding difference in struct size between Solaris and Linux when #pragma pack(1) is used. On Linux Derv is of size 128, but on Solaris it is of size 132. Could someone tell me why that is the case? How can I get it to 128 on Solaris? Below is the code: #include #include #include #pragma pack...
Prashanth
1

votes
1

answer
203

Views

How to grep a file and output the matching part of a line plus a few surrounding words?

I am searching a file for a pattern and would like to limit the output so that it does not display the whole line, but a match surrounded by a few words, so I can see the context. The lines are too long to comfortably view the whole line in the output. I'm looking for a solution with grep, awk, and/...
dabest1
1

votes
1

answer
491

Views

how can i list all packages which ere installed by me in centos without dependencies [closed]

If i execute yum list installed then i get all the pacakges including dependencies packagaes. but i want to find those packages which were installed by me manually by typing command yum install pkgname is it possible in centos
user1994660
1

votes
2

answer
110

Views

Java - LWJGL Screen Glitch

I am messing around with the LWJGL library and have tried to display a screen, it displays fine in every sense except for a screen glitch as illustrated below. This glitch happens every time I display a screen. I have included only the lwjgl.jar as a referenced library and have linked it to the 'lin...
BigBerger
0

votes
1

answer
19

Views

Execution time of c++ code on Linux for the first time is extremly slow

I believe many people have experienced this. It always takes much longer to execute c++ code for the first time on linux. Like calling ::clock_gettime(CLOCK_REALTIME, &ts); for the first time is about five times slower than the third time on my linux box. Allocating memories for the first time is 10...
Lei Yu
0

votes
0

answer
7

Views

“bash: sysctl: command not found” in debian:stretch-slim

when I pull the debian:stretch-slim from hub.docker.com, and then run a container(root), I find that bash: sysctl: command not found. How can I use sysctl in debian:stretch-slim? and many images are builded from debian:stretch-slim, so when I want to use sysctl in some other containers like that:...
Wei
0

votes
0

answer
10

Views

Valgrind reports memory leak with asprintf

Here is a piece of code that writes an HTTP response on a socket based on a simple struct void write_response(request *req, response *resp, int socket) { char *raw_resp; int bytes = 0; asprintf(&raw_resp, "HTTP/1.1 %d %s\r\n", resp->code, resp->reason_phrase); bytes += strlen(raw_resp); for (int i =...
Arkon
1

votes
2

answer
2.6k

Views

What's of_node parameter in the struct device?

The explanation in struct device says Associated device tree node. But, I didn't clearly understand this. Can anyone provide an example?
Sagar Jain
1

votes
1

answer
1.1k

Views

Linux script to automatically convert file type to UTF8

I am in a tight spot and could use some help coming up with a linux shell script to convert a directory full of pipes delimited files from their original file encoding to UTF-8. The source files are either US-ASCII or ISO-8859-1 file encoding. The closest thing that I could come up with is: iconv...
Sledge
1

votes
2

answer
322

Views

Develop a program to analyze the directory structure of a Linux disk and identify any files larger that 500kbytes

I'm trying to develop a program that will analyze the directory structure of a Linux disk and identify any files larger that 500kbytes. #!/usr/bin/perl use File::Find::Rule; use warnings; my $filelist; sub buildFile { open ($filelist, ">", "filelist.txt") || die $!; # File find rule and # Provide sp...
C.Younes
1

votes
1

answer
228

Views

Bash - error code in if statement not working

I am writing a bash script which does a backup to a mounted drive. The backup itself works fine however even if there is an error during transfer it will say its successful. backup() { echo -e "Backup Started\n" >> $1 echo -e "Mounting backup Drive" >> $1 mount $2 /mnt 2>>$1 if [ $? -eq 0 ] ; then e...
user3600401
1

votes
2

answer
5.5k

Views

Implementing my own ps command

I'm trying to implement my own ps command, called psmod. I can use linux system call and all utilities of the /proc directory. I discovered that all directory in /proc directory with a number as their name are the processes in the system. My question is: how can I select only those processes which a...
Michael
1

votes
1

answer
2.4k

Views

Microsoft Kinect Skeleton Tracker Linux

After shutting down the openni and primesense I couldn't find any skeleton tracker library which works in Linux. Is there anything like NiTE2 available right now?
Saffar
1

votes
3

answer
357

Views

terminal goes down with all children even when SIGKILLed but normal processes don't do the same

I would like to have the same effect in my program as the bash(terminal) does when we kill it using SIGKILL. As we know that we cannot handle SIGKILL in our progams so when ever I kill my program its children are assigned to init process, there is no way to handle it so that I can kill all my child...
mSatyam
1

votes
1

answer
687

Views

Meanings of mips flags from readelf command?

I have executed the command "readelf -h test" ("test" is my binary program) on linux, and got following text: ELF header: Magic: 7f 45 4c 46 .... Data: 2's complement, little endian ... **Flags: 0x1007, noreorder, pic, cpic, o32, mips1** ... Could you please let me know each meanings of flags of...
freddy
1

votes
1

answer
908

Views

When does a (FUSE) filesystem check acces rights?

"Unix world" filesystems (like ext4) store for each file, in the inode a list of permission/access rights for the 3 types of available users owner,group,other. I want to know when the "authentication" happens; what I mean is: let's say we have a file file.txt rwx rw- --- st_uid=54...
NiCU
1

votes
1

answer
1.3k

Views

How to complete a svn commit process inside the terminal?

I am a begineer at using svn and linux. I want to remove the test files from the repository URL. These files were added by the import command. Now when I remove these files from the local svn dir using the svn delete command, it is done successfully. Now its time to perform the commit, here lies the...
Naveed Haider
1

votes
3

answer
165

Views

I/O between input and output in C programme

I saw a paragraph on APUE (chapter 5.5): When a file is opened for reading and writing, the following restrictions apply: (1) Output cannot be directly followed by input without an intervening fflush, fseek, fsetpos,or rewind. (2) Input cannot be directly followed by output without an intervenin...
ruanhao
0

votes
0

answer
4

Views

Prevent timeout from waiting for subprocesses

I've got a shell script which repeatedly calls a java process with different arguments. It uses timeout to wait for some amount of seconds before assuming a call has failed and moving on to the next one. I am certain that the java process is finishing in much less time than the allotted timeout: whe...
htuy42
0

votes
0

answer
3

Views

Coding through remote, ssh xlaunch, windows 10 subsystem

Specifically, I'm trying to connect to a remote server through ssh and I've been doing: ssh -Y [email protected] I'm trying to have gui apps appear on my host machine. The reason I want to do this is I want to be able to write code through the windows subsystem at home then test it through ssh on lab...
monsieur40a
1

votes
2

answer
632

Views

Providing assignments to variables from makefiles/kconfig

I have an unsigned long which needs to get a platform specific variable. I do not wish to use boot parameters as this driver will go into products and vendors are reluctant to change boot parameters. I would like to know if this variable can be initialized from Makefile or from Kconfig. I remember...
preetam
1

votes
3

answer
7.9k

Views

Nginx upstream health check modules

Is anyone using any health check modules on nginx. What we need is a simple health checker that would ping the backend nodes and would stop sending traffic to one of them if it doesnt respond to the health check. I found this - https://github.com/cep21/healthcheck_nginx_upstreams But then trying to...
user2809732
1

votes
1

answer
420

Views

Busybox vs Embutils

I have few queries related to BusyBox & embutils. Can anyone brief me on the differences between BusyBox and embutils? It would also be great if you can illustrate scenarios in which these respective tools are being used in embedded Linux environment?
Karthik Balaguru
1

votes
1

answer
1k

Views

How to get android battery level from ubuntu?

I'm trying to access the battery life of my android phone (Samsung Galaxy Y S5360) from my pc (im running ubuntu 14.04), but i can't find anything relevant and so i was wondering if there are any linux/unix tools for getting the battery life or maybe i can access a file on my phone which stores the...
ahk
1

votes
1

answer
289

Views

Serial I/O in C with termios: unreliable output capitalization

I have a very small C program which sends and receives newline-terminated ASCII strings to and from a serial device. It's plugged into my computer with a USB adapter, on /dev/ttyUSB0. Most of the time it sends the commands just find, but occasionally it will capitalize all the lower-case letters to...
Eric Dand
1

votes
2

answer
1.9k

Views

Linux OOM killer does not work

I would like to test if the kernel OOM killer work fine on my embedded Linux or not. I used an application test to fill all memory and see if OOM will kill my application if the system run in out of memory condition. The test program I used: #include #include #define MEGABYTE 1024*1024 int main(in...
Issam.Chorfa
1

votes
3

answer
628

Views

running linux command from java, error 500, Cannot run program No such file or directory

im trying to send an email with a Linux command from Java, i admit i don't know much about Linux but i think iv'e tried everything and i'm just really confused, if someone could shed some light for it would be great i export the application to a war file and upload it to a linux server (CentOS) so h...
Dan Levin
1

votes
1

answer
2.4k

Views

What happen if I delete mongodb database files?

Here is my problem, I'm working with my own test VM on a data transformation project with Talend & Mongodb. Unfortunately I tried launching a Map/Reduce operation on a huge scale with apparently too few space available on disk. It crashed. (I loaded in a single collection data from a 2Go csv file, i...
Vincent Chalmel
0

votes
1

answer
16

Views

python filter lines matching keyworks

I have working python script producing following output. import re import sys import socket conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect(('10.10.10.10', 25001)) conn.send('status\n') data = conn.recv(16777216) conn.close() print data Script output session 3594154272 xwf9VgJQ...
Satish

View additional questions