Is there a way in Bash to recall the argument of the previous command? I usually do vi file.c followed by gcc file.c. Is there a way in Bash to recall the argument of the previous command? Answer You can use $_ or !$ to recall the last argument of the previous command. Also Alt + . can be used
Tag: linux
Taking website screenshot, server-side, on a Linux rented server, free
Ok so, right now I can’t really afford to pay for any service. I want to be able to take screenshots using my rented server, which is Linux based, and output them on the screen. I know there are a lot of services that do this, but they usually have limits or watermarks, or you have to wait for your
appname: /lib/libc.so.6: version `GLIBC_2.8′ not found (required by appname)
ldd -v appname appname is compiled on Ubuntu 9.10, trying to run compiled product on Centos 5. My guess is that Centos5’s /lib/libc.so.5 provides up to version GLIBC_2.4, but appname calls for GLIBC_2.8. But here’s the funny thing. This problem didn’t happen until I started linking to boost&…
Compile/run assembler in Linux?
I’m fairly new to Linux (Ubuntu 10.04) and a total novice to assembler. I was following some tutorials and I couldn’t find anything specific to Linux. So, my question is, what is a good package to compile/run assembler and what are the command line commands to compile/run for that package? Answer …
How I can get ports associated to the application that opened them?
I need to get a list of all opened ports on my machine and what application opened them. I need to get this information programmatically. Thanks. Answer I was hoping a cleverer answer would appear. I did just this (programmatically in Python), in an attempt to rewrite a program called NetHogs. My version is h…
Compare two websites and see if they are “equal?”
We are migrating web servers, and it would be nice to have an automated way to check some of the basic site structure to see if the rendered pages are the same on the new server as the old server. I was just wondering if anyone knew of anything to assist in this task? Answer Get the formatted output of
BASH: how to perform arithmetic on numbers in a pipe
I am getting a stream of numbers in a pipe, and would like to perform some operations before passing them on to the next section, but I’m a little lost about how I would go about it without breaking the pipe. for example Would you have any ideas on how to make something like this work? The actual operat…
getting HTML source or rich text from the X clipboard
How can rich text or HTML source code be obtained from the X clipboard? For example, if you copy some text from a web browser and paste it into kompozer, it pastes as HTML, with links etc. preserved. However, xclip -o for the same selection just outputs plain text, reformatted in a way similar to that of elin…
Loading a config file from operation system independent place in python
under Linux I put my configs in “~/.programname”. Where should I place it in windows? What would be the recommendated way of opening the config file OS independent in python? Thanks! Nathan Answer Try: On linux this will return: On windows this will return: Which is a little ugly, so you’ll …
tipc protocol in windows [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 11 months ago. Improve this qu…