Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago. Improve this question I’m aware that the general convention is that short flags (or single dash “-“) is followed by a single character, and
Tag: command-line
IF statement for different lines [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago. Improve this question Question is simple, but I can’t find a fast and elegant way to solve. I want to decide next: if block size of files is
How to copy a folder containing absolute symlinks and preserve their relative targets
Suppose I have a folder: /usr/lib/x86_64-linux-gnu/wxcrafter containing some library files and their corresponding symlinks, e.g: /usr/lib/x86_64-linux-gnu/wxcrafter/lib1.so.0 -> /usr/lib/x86_64-linux-gnu/wxcrafter/lib1.so.0.0.0 /usr/lib/x86_64-linux-gnu/wxcrafter/lib2.so.0 -> /usr/lib/x86_64-linux-gnu/wxcrafter/lib2.so.0.0.0 I want to make a copy of wxcrafter to a new location codeblocks, preserving the relative location of the symlink targets: usr/lib/x86_64-linux-gnu/codeblocks/lib1.so.0 -> /usr/lib/x86_64-linux-gnu/codeblocks/lib1.so.0.0.0 /usr/lib/x86_64-linux-gnu/codeblocks/lib2.so.0 -> /usr/lib/x86_64-linux-gnu/codeblocks/lib2.so.0.0.0 How do I do this on the command line, given that there
Grep for String and open at the corresponding line
I’m having several occurrences of a specific string over several files in several lines obtained with grep. I’d like to open these files sequencially on the corresponding lines. I tried to do it with vim, but so far no success when it comes to open the line. Mustn’t be vim or grep, but I’d assume there must be some kind
How to pass run time arguments to a function in c through a shell script
I have a shell script which has to take arguments from the command line and pass it to a function in C. I tried to search but didn’t find understandable solutions. Kindly help me out. Should the arguments be passed via an option as a command in the shell script? I have a main function like this: How to pass
rpm -q -> query only the descripton
I can query the informations about a rpm-package with Example-Result of a Query: But I only want to query the Description. Is that possible? The reason for that is that I want to process this information (the Description) in a C++ Program (I do this with popen()). Maybe something like this: Answer This is the correct sollution:
Why does the permission expression 653 mean rw- r-x -wx [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
How to specify more inputs as a single input in Linux command-line?
I searched online but I didn’t find anything that could answer my question. I’m using a java tool in Ubuntu Linux, calling it with bash command; this tool has two paths for two different input files: What I’d like to do is for example, instead of specify the path of a single FASTQ, specify the path of two different files.
Deleting files after 7 days not working
I am trying to delete all files that are older than 7 days. The command is working but not correctly. It does delete files but it’s not accurate. The find does delete files, but when I run the ls command does contain files that should be deleted. For example today is November 7th. The find should delete all files before
Using grep to match where two tokens occur on the same line
I am reading the man page, and found this blog post, and both seem to say the same thing, but it does not work. I have a project where I need to batch replace lines like into but I do not want to match lines like : i.e. : only “imports” from the base dir /modules. I have tried but