top | item 5340181

Linux cheat sheet

80 points| jnazario | 13 years ago |github.com | reply

29 comments

order
[+] williamhackmore|13 years ago|reply
Hey all, yes, I am the author of the cheat sheet. You all spotted a ton of typos that I hadn't even noticed. Thank you! I have just been flooded with patches. I am trying to sort through them now. Thank you for all of your work.

I know it may seem odd to GPL a list of commands. My intention was to build up a minimal reference sheet covering just what people need to know to get started with Linux Dev, but also with a special attempt to include obscure and useful features that may benefit old-timers perusing this reference.

I have since attempted to address the Ubuntu/Debian centric perspective of the sheet. I also addressed the comments about "&&" and "ssh -X" I will also expand the section on "tar."

-William Hackmore

[+] visarga|13 years ago|reply
Can I find out what files a process is using, and what files are most used at the moment? It would help debug heavy load moments, when the disk becomes less responsive.
[+] gnosis|13 years ago|reply
To find out what files a given process is using:

  lsof -p PID
where "PID" is the process id of the process in question.

As for which files are most used at the moment, I'm not sure. However, "iotop" will show you which processes are using the most io at the moment.

[+] chrisbolt|13 years ago|reply
Most used files:

  lsof -n | grep REG | awk '{print $9}' | sort | uniq -c | sort -n
[+] stuffihavemade|13 years ago|reply
ls -a should be ls -la if you want "maximum information" (not really maximum)

Also, ifconfig is deprecated.

[+] scjr|13 years ago|reply
I'm yet to see any of these command line tips show (GNU) tar with the -a (--auto-compress) tag

    # compress a file, tar will automatically compress it according to the file extension you use
    tar -caf archive.tar.gz file1 file2 ...
    
    # extract a file, again tar will automatically pass it through the right decompression program
    tar -xaf archive.tar.gz
[+] nawitus|13 years ago|reply
I think it's faster to Google something than to use these kind of lists. Of course, there's value from skimming through the list once.
[+] LukeShu|13 years ago|reply
What package is md5deep from? I've never seen it, but had several use-cases for it.
[+] timdoug|13 years ago|reply
What's wrong with:

  find . -type f -exec md5sum {} \;
[+] sp332|13 years ago|reply
The "md5deep" package contains several different hashes including the actual md5deep program but also whirlpooldeep etc.
[+] fsck0ff|13 years ago|reply
I can't believe a list of commands is GPL licensed, this is ridiculous...
[+] MereInterest|13 years ago|reply
By the letter of the law, the arrangement is copyrightable, though the information itself is not, in the same way that the arrangement of a phone book is copyrightable even though the phone numbers are not. Yes, it is ridiculous.
[+] felipebrnd|13 years ago|reply
Interesting, there is mention to execution control but doesn't cite

[command] && [command]

and

[command] || [command]

[+] dmckay|13 years ago|reply
Good stuff, except this, ssh -x [username]@[ipaddress] is the opposite of what he wanted to do, it's ssh -X. -x disables forwarding.
[+] subway|13 years ago|reply
ssh -Y would probably be an even better choice for this sort of document, lest the end user find themselves going 'Why the heck isn't this working?'.
[+] Nursie|13 years ago|reply
Nice work, would be a good guide for *nix (ok mostly linux) command line beginners to have around.

Which I guess is entirely the point :)

[+] sparx|13 years ago|reply
since when Linux is equivalent to Ubuntu?

and why git/mysql stuff are included for linux cheat sheet?

[+] Zigurd|13 years ago|reply
Like all git novices, they forgot "git add."