Skip to content

getting current directory in linux for argument

I’m learning Linux scripting and trying to set up a function that finds all files in the current directory. I know I could use ls but I’m wondering if there is a way to get the current directory as a command and pass it to an argument. This just prints out pwd:, which obviously isn’t it. Ans…

How to print a number in ARM assembly?

I am trying to print a number that I have stored. I’m not sure if I am close or way off. Any help would be appreciated though. Here is my code: It compiles and runs, but I don’t see anything printed. From what I understand, I need the address of where to start printing in r1, how many bytes in

check if file is open with lsof

I’m using linux mint 13 xfce and I have a file named wv.gold that I’m trying to check in bash if it’s open by any program (for instance, I opened it in sublime-text and gedit) In many forums people say that if I run lsof | grep filename I should get 0 if it’s open or 256(1) if it&#8217…

Ubuntu GTK+3 Eclipse Link

Is there any simple tutorial on linking gtk+3 libraries with eclipse indigo cdt on ubuntu platform? As I googled, I have been trying to use the pkg-config commands but still getting same result; the SDK cannot resolve gtk methods. I downloaded libgtk3-dev and gtk3 from synaptic properly. I included all the he…

Killing a screen without a specific session #

To create a screen, I am currently doing: That works perfectly, however killing it remotely with: Will reply with: This is due to the screen having {session#}.{screenname} It will work if done as: What solutions are possible? I’m not entirely sure that you can get the session# when you start the screen.…

Grep time command output

Using time ls, I have the following output: Now, when I try to grep only the real value line, the actual result is: My question is, how to get only the real value as output? In this case, 0m0.040s. Answer time writes its output to stderr, so you need to pipe stderr instead of stdout. But it’s also impor…