Posts Tagged ‘linux’
Sometimes, every once in a while, a programmer feels like I do. VIM should be more efficient, more effective for editing text files yet I find myself reverting to the modern mouse-based approach more often than not.
A rather famous question on Stack Overflow asked for tips on how to be more productive with VIM – and he got one of the best answers I’ve ever seen. Not a list of tips but a working, detailed explanation from Stack Overflow user Jim Dennis. It’s so good, I am copying his answer’s raw source here, running it through the Markdown parser and copied it here.
So, without further ado, over to Jim’ amazing answer.
When you’re working on your Linux or Mac OS X system’s command line, the prompt is the text to the left of the commands you enter. The default prompt varies for every system, but it usually gives you an indication of your username, your machine’s host name and your current working directory. Also, it ends with a dollar sign
$ if you’re working as a normal user. If you’re working with
root privileges, it ends with
The prompt can be customized to include relevant information that can help you increase productivity, to hide information you don’t care about, or to highlight the lines in your terminal output where you entered commands.
This post will show how to customize your
bash prompt, and, in the process, explain a few of its more advanced features that improve your productivity. Bash is the default shell on Mac OS X, available for all (or most) Linux distributions, if not already included, and available on Windows via Cygwin.
Ask some Windows users why they aren’t using Linux and chances are you will hear “because [program] doesn’t have a Linux version.” Although cross-platform software is popping up all over the place, there are still a number of applications that are restricted to a single platform – and for a lot of software, that platform is Microsoft Windows.
However, all is not lost. Although Linux has its own executable format and set of system libraries, a tool exists that will allows us to run a good portion of our Windows applications directly in Linux. This tool is of course, Wine. Wine initially began as a small project that was designed to run simple 16-bit Windows applications. As time went on, the target shifted to 32-bit applications and the long and hard process of rewriting Windows’ user-mode libraries began.
I have seen a large number of questions on Super User recently all around the same topic of Linux and Unix file permissions. For example:
File permissions in UNIX are frequently specified as an octal number. Why is octal the preferred base for this purpose?
… and …
I own a particular file on a Linux system. I would like to give 2 groups (accounting, shipping) read access and only read access, and 3 users(Mike, Raj and Wally) write access and only write access. How can I accomplish this?
In a world of Windows where file permissions can be granted on a per-user basis, Linux and Unix permissions seem to be very hokey and restricted.
Well, let me tell you, they’re not. For such a seemingly basic arrangement they are an incredibly powerful tool.
Most people forget that to do anything even remotely fancy with permissions in Linux you really have to couple them with groups. And you really can do some fancy things with them!