Live data from Hacker News

Learn just enough Linux to get things done

alexpetralia.com

41–50 of 138 posts

Re: Learn just enough Linux to get things done

#41
post #5

This article should be named "Learn just enough Unix to get things done". Almost everything explained can be done on any Unix-like system like macOS and it's not exclusive to Linux.

Most of it applies to any posix-ish shell, even on non-unices.

And you can get quite a bit done on Linux without knowing any of it.

Re: Learn just enough Linux to get things done

#42
post #24

One example of this is the popular version control system (VCS) called git. Developers could have written this software to work on Windows, but they didn't. They wrote it to work on the command line for Linux because it was the ecosystem which already had all the tools they needed. I think the real (and even stronger) reason is that Linus Torvalds specifically built Git to serve as the VCS for the Linux codebase.

And git does work on Windows. There's even a windows logo on the official download page. https://www.git-scm.com/downloads

The originally released Git did not run on Windows.

The first Windows-compatible release was msysgit, which was effectively a mingw/msys Linux emulation layer for Windows. Not quite native, but it worked. Kind of. Not really very well at first.

The current Windows download - "Git for Windows" - is still msys-based, just with a lot of compatibility/package-management/ux-polish changes.

All that and the fact that recent Windows includes Windows Subsystem for Linux make the differentiation somewhat moot, but, essentially, Git is a *nix app.

Re: Learn just enough Linux to get things done

#43
post #37

This is not a surprise - the Windows ecosystem simply wasn't designed with software development in mind. Aha? What is C# and Visual Studio? Or .NET? Was Linux designed for software development? This article is so bad, I'm really getting mad over here. Stop publishing such crap, you feed a lot of people's resentment against all those hipster developers who don't want to learn by RTFM, but want to have handled everythi…

> Was Linux designed for software development?

Linux was designed to emulate Unix and run the pre-existing Unix-like userspace from GNU.

And absolutely yes, Unix was "designed" for software development. That's exactly what it was in its early days: a hacker playground for the geeks at Bell Labs to try new ways of doing things.

And windows wasn't. Early windows development (for years after it became popular) was done at a DOS command line. Eventually Visual C++ because the dominant product, and certainly you can't say it wasn't innovative. But it remained a separate product. "Windows" wasn't for development. And we still suffer from this in, say, the way windows basics (like the standard C runtime!) typically need to be shipped per-app and are only vaguely compatible across OS and toolchain changes.

Re: Learn just enough Linux to get things done

#44
post #24

One example of this is the popular version control system (VCS) called git. Developers could have written this software to work on Windows, but they didn't. They wrote it to work on the command line for Linux because it was the ecosystem which already had all the tools they needed. I think the real (and even stronger) reason is that Linus Torvalds specifically built Git to serve as the VCS for the Linux codebase.

And git does work on Windows. There's even a windows logo on the official download page. https://www.git-scm.com/downloads

Git for Windows relies pretty heavily on MinGW, though. And it's best used from the included bash shell.

Re: Learn just enough Linux to get things done

#45
post #43
post #37

This is not a surprise - the Windows ecosystem simply wasn't designed with software development in mind. Aha? What is C# and Visual Studio? Or .NET? Was Linux designed for software development? This article is so bad, I'm really getting mad over here. Stop publishing such crap, you feed a lot of people's resentment against all those hipster developers who don't want to learn by RTFM, but want to have handled everythi…

> Was Linux designed for software development? Linux was designed to emulate Unix and run the pre-existing Unix-like userspace from GNU. And absolutely yes , Unix was "designed" for software development. That's exactly what it was in its early days: a hacker playground for the geeks at Bell Labs to try new ways of doing things. And windows wasn't. Early windows development (for years after it became popular) was done…

> Early windows development (for years after it became popular) was done at a DOS command line ...

I could just as easily flip this and claim that Linux development is all backwards because it's still done on the command line.

Given Microsoft's commitment to tooling, backwards compatibility and extensive documentation I think it's pretty lame to try and paint windows as not targeted towards developers. The difference is that windows has actual users, as opposed to the eternal horizon of "the year of linux on the desktop".

Re: Learn just enough Linux to get things done

#46

Mentioning strace in an article titled "Learn just enough Linux to get things done" seems so out of place as to be absurd, even in an "Advanced" section. Anyone who needs the rest of this advice is going to be absolutely baffled by strace. Otherwise, decent little primer.

I'd tend to agree, but I think it really depends on what the person is doing/what the end goal is.

Re: Learn just enough Linux to get things done

#47
post #43

Earlier quoted context omitted.

> Was Linux designed for software development? Linux was designed to emulate Unix and run the pre-existing Unix-like userspace from GNU. And absolutely yes , Unix was "designed" for software development. That's exactly what it was in its early days: a hacker playground for the geeks at Bell Labs to try new ways of doing things. And windows wasn't. Early windows development (for years after it became popular) was done…

> Early windows development (for years after it became popular) was done at a DOS command line ... I could just as easily flip this and claim that Linux development is all backwards because it's still done on the command line. Given Microsoft's commitment to tooling, backwards compatibility and extensive documentation I think it's pretty lame to try and paint windows as not targeted towards developers. The difference…

[deleted]

Re: Learn just enough Linux to get things done

#48
post #36

Earlier quoted context omitted.

Doesn't look any more complex than most man pages: https://linux.die.net/man/1/tar

IMHO, the minimum expected from a man page is to be complete. For example, this link does not give enough information to understand why "tar cfz x.tgz x" works, but not "tar -tfz x.tgz"

It says in the man page explicitly that it's not complete and you should look at `info tar` for the full man page. Also, because the problem really has nothing to do with tar -- every man page doesn't need to explain how old/short/long options work.

Section 3.3.3 "Old Option Styles" covers exactly the situation you describe.

> This old way of writing 'tar' options can surprise even experienced users. For example, the two commands:

> tar cfz archive.tar.gz file

> tar -cfz archive.tar.gz file

> are quite different. The first example uses 'archive.tar.gz' as the value for option 'f' and recognizes the option 'z'. The second example, however, uses 'z' as the value for option 'f' -- probably not what was intended.

> Old options are kept for compatibility with old versions of 'tar'.

> This second example could be corrected in many ways, among which the following are equivalent:

> tar -czf archive.tar.gz file

> tar -cf archive.tar.gz -z file

> tar cf archive.tar.gz -z file

Re: Learn just enough Linux to get things done

#49
post #8
post #3

In my project, I maintain 3 documents. The first one is a similar list of basic linux knowledge that people should learn when arriving on the project. The second is "UnixTipsAndPitfalls" where people should add new entries when they encounter usefull commands. The third one is about tar.

Over years I've heard a lot of complains on tar being hard to use, but in real-life I really ever had to use only these two commands: tar zcvf and tar zxvf. It's actually quite easy to remember: tar Zip Compress Verbose File, and tar Zip eXtract Verbose File.

You can just do `tar caf` and `tar xaf`. It detects the archive format automatically (and I personnally find it easier to remember: "compress-as-fuck" and "extract-as-fuck").

Re: Learn just enough Linux to get things done

#50
post #43

Earlier quoted context omitted.

> Was Linux designed for software development? Linux was designed to emulate Unix and run the pre-existing Unix-like userspace from GNU. And absolutely yes , Unix was "designed" for software development. That's exactly what it was in its early days: a hacker playground for the geeks at Bell Labs to try new ways of doing things. And windows wasn't. Early windows development (for years after it became popular) was done…

> Early windows development (for years after it became popular) was done at a DOS command line ... I could just as easily flip this and claim that Linux development is all backwards because it's still done on the command line. Given Microsoft's commitment to tooling, backwards compatibility and extensive documentation I think it's pretty lame to try and paint windows as not targeted towards developers. The difference…

The fact that you think a DOS command line c. 1993 and a Unix one (from, say, 1984 even!) are comparable basically ends this argument, you realize, right?
Post reply on HN