I just got a error from connect API in linux. I knew ‘connect’ will return zero if connection is successful, I got return value “3” is it error code? or is there something else what don’t know? I got value 3 from sock. Answer To get the return value of connect(), it is most strai…
Where are inodes stored at?
I recently started learning about the Linux kernel and I just learned about inodes, which are data-structures containing meta-data of a file. Now, how do the OS find the associated inode of a file? (Let’s say a string of a path). Moreover, where are those inode stored at? I mean, obviously they are stor…
Spring Boot Missing Plugin when Running from Command Line
I have a maven project that I can run in Eclipse, but I can’t get it to run from the linux command line. I get an error when I run ‘mvn spring-boot:run’: “No plugin found for prefix ‘spring-boot’ in the current project and in the plugin groups [org.apache.maven.plugins, org…
ignoring variable containing and multiple spaces usnig sed command
I have two variables, i want to replace ESX_10.2.3.4@10.52.33.21 with new pool ser/@10.25.89.322 and also want to remove space before new word. i have tried like, and I don’t want to delete space ,just want to replace as it is(except space before “new”). Answer Give a try to this: It is remo…
Combine 3000k txt files into one txt file Linux
I want to combine 3000k txt files in one txt file Tried this: But this is gives an error How to do this Answer You can use find for that: * expansion has limits because bash expands it into every single filename and arguments are limited by kernel setting MAX_ARGS_PAGES (see http://www.linuxjournal.com/articl…
ldconfig can’t find lib in standard location
EDIT: Cloudera says that CentOS is supported please check Cloudera manual install as they have instructions on how to do so, it relies on libpython2.6.so.1.0 and libsasl2.so.2. When installing a package ( impala from cloudera repository ) I am told that libsasl2.so.2 and libpython2.6.so.1.0 are missing. After…
How to delete numbers, dashes and underscores in the beginning of a file name
I have thousands of mp3 files but all with unusual file names such as 1-2songone.mp3, 2songtwo.mp3, 2_2_3_songthree.mp3. I want to remove all the numbers, dashes and underscores in the beginning of these files and get the result: Answer This can be done using extended globbing: This uses parameter expansion: …
Move mp3 files from one directory to separate directories by artist, album, song name
I have a backup of all my mp3s files in one folder. Would there be a bash command to automatically move all files in their own band-album title directories that would be created on the fly? As you can see in the image, first words before dash are artist names, then comes the album title, then comes the name o…
correct way to rename user and remove password with ec2 user-data
I have a centos7 base ami and have successfully changed the user name using the ec2-launch user data modified from an amazon-linux script log in works as expected and home directory has been changed, however when I use sudo it still asks for a password. As I cannot get into the file to check format I wonder i…
‘undefined reference to’ Linker errors with latest LLVM from git (3.9.0svn) on Arch Linux
Prior to my Macbook Pro motherboard failure I was working on a programming language of mine with Flex, Bison, and LLVM. I honestly don’t recall the version of LLVM I was linking against at the time (I will try to find this out after I salvage the data from the drive), but I do know that the latest versi…