Unix tricks
11–20 of 232 posts
Re: Unix tricks
#12> SMB is better than NFS. More details would be nice.
NFS basically breaks the client computer until the host responds, while SMB detects the I/O error earlier and, at least, doesn't hang the terminal. Other than that, SMB allows for permissions and a bunch of other features. It is, basically, a more modern and robust protocol. Does NFS shine for some use cases? Indeed. Would it be the first choice for most ones? Nope. Disclaimer: my sysadmin skills are not so great, I'…
http://tldp.org/HOWTO/NFS-HOWTO/client.html
Soft mounts report errors immediately, hard mounts hang.
And for permissions, NFS provides everything under the sun that you could possibly need via ACLs. NFSv4 is a very modern protocol, much as SMBv2 is (not SMB though, it's awful).
Linux has had NFSv4 for what, 6 years now, at least, and even v2 and v3 had some limited ACL support?
Re: Unix tricks
#13To pipe all the contents of your current directory (including dotfiles) to the destination machine.
Greetings from LSI-UPC!
Re: Unix tricks
#141) `pgrep` is a standard utility that does what his `psgrep` does and much much more. 2) htop is a cpu and memory hog -- every time I've used it I noticed it takes 6+% CPU time 3) there's an awk trick to do the `sort | uniq` recommendation that works on 10+GB files (single pass): awk '!x[$0]++' 4) Passwordless keys are dangerous -- use ssh-agent to save the password of the keys
Not trying to contradict you, just some explanations 1. I prefer 'psgrep' because it covers 99% of my use cases for pgrep (ps axuf | grep $NAME) 2. htop is very nice, come on! Would not let it running on the background for hours, but it's nicer than top 3. Note taken, thanks! 4. Is ssh-agent really safer than using passwordless keys? Just asking, I'm curious
2. In my experience on Debian (granted this was in 2010), there is a noticeable performance difference between `htop` and `top`.
4. ssh-agent stores the password in memory and is erased on reboot. OTOH If you use a passwordless key file, anyone can use it if they have the key.
Re: Unix tricks
#15Re: Unix tricks
#16Earlier quoted context omitted.
NFS basically breaks the client computer until the host responds, while SMB detects the I/O error earlier and, at least, doesn't hang the terminal. Other than that, SMB allows for permissions and a bunch of other features. It is, basically, a more modern and robust protocol. Does NFS shine for some use cases? Indeed. Would it be the first choice for most ones? Nope. Disclaimer: my sysadmin skills are not so great, I'…
NFS has 2 mount types, soft and hard. http://tldp.org/HOWTO/NFS-HOWTO/client.html Soft mounts report errors immediately, hard mounts hang. And for permissions, NFS provides everything under the sun that you could possibly need via ACLs. NFSv4 is a very modern protocol, much as SMBv2 is (not SMB though, it's awful). Linux has had NFSv4 for what, 6 years now, at least, and even v2 and v3 had some limited ACL support? h…
Re: Unix tricks
#17or just use tmux
Re: Unix tricks
#18> SMB is better than NFS. More details would be nice.
NFS basically breaks the client computer until the host responds, while SMB detects the I/O error earlier and, at least, doesn't hang the terminal. Other than that, SMB allows for permissions and a bunch of other features. It is, basically, a more modern and robust protocol. Does NFS shine for some use cases? Indeed. Would it be the first choice for most ones? Nope. Disclaimer: my sysadmin skills are not so great, I'…
Re: Unix tricks
#19tar czf - . | ssh destination "tar xz" To pipe all the contents of your current directory (including dotfiles) to the destination machine. Greetings from LSI-UPC!
PS: hey, we're neighbors! :)
Re: Unix tricks
#20It substitutes the last argument in the previous command into the current one.
For example:
$ ls /some/long/path/somewhere/looking/around/
$ cd !$
cd /some/long/path/somewhere/looking/around/