Otherwise, decent little primer.
Learn just enough Linux to get things done
21–30 of 138 posts
Re: Learn just enough Linux to get things done
#22In 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.
> The third one is about tar. Why do people have such a difficult time with tar? The only tar commands I've ever needed (or seen other people need) are `tar cf ...` or `tar xf ...` (occasionally I'll need to chuck a z in there if the file is/needs to be gzipped), are other people just using far more complex tar commands than I am?
ssh -n -C -x ${DELIVERY_USERNAME}@${DELIVERY_HOSTNAME} tar ch
-C ~${DELIVERY_USERNAME}/${VERSION_PATH}/Escape/AIR_Delivery/PWP_Delivery
Configuration_Files Executables Libraries Scripts
| tar x -C ${install_appli} --transform 's,^Executables,bin,;s,^Configuration_Files,config,;s,^Scripts,config,;s,^Libraries/PWP_Configuration_Application.jar,config/PWP_Configuration_Application.jar,;s,^Libraries,lib,'Re: Learn just enough Linux to get things done
#23Earlier quoted context omitted.
> These systems must become more accessible to the average human. I disagree. Firstly, all the commands you mentioned are pretty simple to understand given that they have a manpage and lots of help available online. Secondly, not everything needs to dumbed down for the average user. A large part of the power comes from all the tools and flags available and the combination possibilities. Dumbed down tools are limiting…
Problem is, as I've already mentioned elsewhere, that the manpages do a pretty poor job in a number of places. Yes, I do use them but I guess most Linux users learned most of what they use from colleagues and Internet, not the official documentation.
Re: Learn just enough Linux to get things done
#24I think the real (and even stronger) reason is that Linus Torvalds specifically built Git to serve as the VCS for the Linux codebase.
Re: Learn just enough Linux to get things done
#25Mentioning 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.
Re: Learn just enough Linux to get things done
#26One 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.
Re: Learn just enough Linux to get things done
#27In 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 think of Tar arguments as either subcommands or options. The dashes are optional
The "subcommands" are x (extract), c (create), t (list), among others.
The "options" are f (read from named file rather than stdin), v (verbose mode), and z (run gzip on the archive before processing).
The fact that these options can be written without leading dashes, and all smashed together in a single argument, is legacy silliness for saving a few keystrokes. Don't confuse yourself with it, and don't confuse other people by teaching it to them, instead of teaching them how to actually use the command (which is really not hard at all).
So when I write Tar commands, I like to think along these lines. Instead of "tar zcvf foo.tar.gz", I write "tar -c -zv -f foo.tar.gz". After doing that about 3 times, it all sank in. Nowadays I'm much more intimidated by Git than Tar.
In the version of tar on the machine I'm posting from (GNU tar 1.27.1), this structure is obvious from right there in the man page:
SYNOPSIS
Traditional usage
tar {A|c|d|r|t|u|x}[GnSkUWOmpsMBiajJzZhPlRvwo] [ARG...]
UNIX-style usage
tar -A [OPTIONS] ARCHIVE ARCHIVE
tar -c [-f ARCHIVE] [OPTIONS] [FILE...]
tar -d [-f ARCHIVE] [OPTIONS] [FILE...]
tar -t [-f ARCHIVE] [OPTIONS] [MEMBER...]
tar -r [-f ARCHIVE] [OPTIONS] [FILE...]
tar -u [-f ARCHIVE] [OPTIONS] [FILE...]
tar -x [-f ARCHIVE] [OPTIONS] [MEMBER...]Re: Learn just enough Linux to get things done
#28Re: Learn just enough Linux to get things done
#29Earlier quoted context omitted.
> The third one is about tar. Why do people have such a difficult time with tar? The only tar commands I've ever needed (or seen other people need) are `tar cf ...` or `tar xf ...` (occasionally I'll need to chuck a z in there if the file is/needs to be gzipped), are other people just using far more complex tar commands than I am?
Because people assume they should RTM and if memory serves me right it is a whole lot more confusing than your post :-)
Re: Learn just enough Linux to get things done
#30One 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.
Mercurial was built for exactly the same reason (VCS for Linux), at the same time. Yet it has always been cross-platform.
Linus wrote it for Linux because he didn't care about whether it would work in Windows. No other reason.