I’m running Hadoop 2.6.2 on a private cluster with file-system permissions enabled. The cluster has password files with only system users like hadoop, no personal accounts. I’m accessing DFS from a linux edge node that has personal accounts like mine (‘clott’). The problem is that I ca…
Eliminating “File changed on disk” warning in emacs on VirtualBox
I am running Windows 10 with VirtualBox (5.0.10). I have Ubuntu 14.04 installed as a guest OS which accesses the host OS via a vboxfs share. When editing a file saved on the host (Windows) OS via this share, emacs continually gives me a warning that the file I am currently editing has been changed on disk (Fi…
Implement a similar module_init as Linux kernel, but meet some trouble in ld script
I like the linux kernel module_init function very much, I would like to implement the same function for my user space applications. I try to modify the linker script to do this: 1, copy a x86-64 standard ld script 2, add my customized section 3, put the init function pointer into moudle_init section 4, compil…
How do I replace all lines after line XX in one file with content from another file?
I’m on Debian 8.2. Here’s test.sh so far. I want lines 26 onwards of fileA’s content to replace everything in fileB from line 26 onward — so I end up with the first 25 lines of the output are from lines 1-25 of the original fileB and the remainder is lines 26 onwards of fileA. How do I do th…
Linux tar command ignore files which permission denied
I encountered an issue when I tar a directory. There is a backup file in one of the sub directory created by another user and it doesn’t allow other user to read. so my tar command was failed. My question is: Can I ignore this file (actually this file is not important) and tar the rest of the files/dire…
How can i save automatically the SSH_CLIENT at login?
i want to save the user’s IP when he connects to it’s home folder, this is because i’m a user in a server where my team has a folder where our public_html is located, but we use the same account, so i just want to register who connected. So i want to make a script that triggers when a connec…
link count and ls command
I’m learning file link count. Only when link count reaches 0 can file’s contents be deleted. In my test the process opens a file in directory “/home/hel/myfile” and sleep 10(s). At the same time I delete it using “rm /home/hel/myfile”. Then I use command “ls” and disp…
Iterating over lines in a file with “for” in shell never matching target
i wrote a shell script as you can see followed. The script reads all line which in .dat file and writes screen matching words according to specified parameter but if/else block doesn’t properly.Both block if and else fired same time. sh file dat file terminal result Answer The original code didn’t…
errno.h socket/connection error classification
I’m using boost::asio on linux to send http request, using almost exactly this code boost asio http I want to catch exceptions and classify them using errno.h error codes to three groups GROUP 1. errors occurred because of local host socket/connection. GROUP 2. errors occurred because of local host or r…