Tag Info

Hot answers tagged

50

iftop is cool and lightweight. ntop is even cooler but web-based and uses a daemon.


47

Try using the -t option to ssh ssh -t root@my.machine screen "tail -f /var/log/messages" From man ssh -t Force pseudo-tty allocation. This can be used to execute arbi- trary screen-based programs on a remote machine, which can be very useful, e.g., when implementing menu services. Multiple -t options force tty allocation, ...


38

maybe they use tail -f on the access log?


31

I love using it for connecting to serial consoles, i.e. screen /dev/ttyS0 19200 This command simply opens up a connection to serial port 0 (ttyS0) with a baud speed of 19200


30


24

$ find /path/to/folder -type f -delete


23

top on MacOS X does support sorting, at least: O<skey> Set secondary sort key to <skey> (see o<key>). o<key> Set primary sort key to <key>: [+-]{command|cpu|pid |prt|reg|rprvt|rshrd|rsize|th|time|uid|username|vprvt |vsize}.


22

You should be able to find out what killed your process by looking at the output of the dmesg command; or at the logfiles /var/log/kern.log, /var/log/messages, or /var/log/syslog. There are a number of things that can cause a process to be summarily killed: If it exceeds the hard ulimit for various memory or cpu usage types that you can examine using ...


20

I'm working on porting htop to OSX. The repo is here (more active fork here, and can be installed via brew install htop) I'm currently trying to work out what to do about the licensing clash between Apple's libtop (APSL) and htop (GPL). There's probably not much more programming to do on it - but I may have to re-implement the bits of libtop I need. If ...


19

$ touch {a,b,c,"white space"}.sample $ ls *.sample a.sample c.sample b.sample white space.sample $ for SAMPLE in *.sample; do mv -v "$SAMPLE" "${SAMPLE%.sample}"; done a.sample -> a b.sample -> b c.sample -> c white space.sample -> white space Edit: Also see ${parameter#word}, which deletes word from the front of parameter: $ ...


19

which will search your path for the arguments you supply, it's found on just about any BSD or SysV UNIX moriarty:~ dave$ which bash true false /bin/bash /usr/bin/true /usr/bin/false


19

IPTraf is another common real-time bandwidth monitor on Linux IPTraf-ng is a updated fork of IPTraf with ipv6 support


17

You can use: ssh root@host screen -m -d "tail -f /var/log/messages" That starts a detached screen with a command running on it. -m causes screen to ignore the $STY environment variable. With "screen -m" creation of a new session is enforced, regardless whether screen is called from within another screen session or ...


16

Terminal.app when using Mac OS X


16

Holding down the Ctrl-Alt while dragging the left mouse button.


14

This is what the 'screen' utility was invented for. Although I've used it mainly on Linux, there's absolutely no reason a port for your OS couldn't exist. It's part of the gnu tool set, and I haven't found a port, but one probably exists (or could).


13

You should check out Windows Powershell. http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx You could also try Cygwin if you're partial to Linux. http://www.cygwin.com/


12

Or even something like logstalgia ;-)


12

You could try using the "screen" command. This will allow you to run a multiuser session which 2 users can connect and share. First you'll need to set the suid bit. screen comes with it turned off, and it is necessary for multiuser mode: sudo chmod +s /usr/bin/screen sudo chmod 755 /var/run/screen The first user connect, running screen -S shared The ...


12

This looks absolutely puzzling to me. Either it should use some DNS name or IP address. I checked the last.c file also but I still can't find why it is not showing anything. Probably given some time, I can figure out the part about 0.0.0.0. int dns_lookup(char *result, int size, int useip, int32_t *a) 307 { 308 struct sockaddr_in sin; 309 struct ...


11

[Update: As of Mac OS X Mountain Lion 10.8, Terminal supports the Backtab escape sequence, eliminating this issue.] The version(s?) of nano on those servers sometimes sends a Backtab (ESC [ Z) sequence when moving the cursor left by one character, but Terminal doesn't support this sequence, so nano thinks the cursor has moved when it hasn't and its idea ...


10

Many network devices use the Yost RJ45 pinout for RS-232 console communications. Cisco is probably the best known, but certainly not the only. The switch should have come with a DB9 to RJ45 blue cable. You can just pickup any USB-DB9 Serial adapter (though I highly recommend getting one with a Prolific PL2303HX Rev D Chipset, as they "just work" and are ...


10

nethogs, in case you need traffic analys per application - darkstat also works (web frontend)


10

Have you tried console2? It lets you use cmd, bash, or any program as your shell, and allows resizing in any direction. You can make it default to Git Bash by going to Edit->Settings, then pasting this in the Shell field: "C:\Program Files\Git\bin\sh.exe" --login -i" To copy, hold Shift, click and drag with the left mouse button to select, then left ...


10

iTerm on OS X. http://iterm.sourceforge.net/


10

The best feature of screen is Byobu (formerly screen-profiles) which comes with Ubuntu by default since Jaunty: https://launchpad.net/byobu It's a configuration manager with very nice defaults, tons of status notifications and useful keyboard shortcuts (i.e. f2 for new screen, f3-f4 for prev/next etc.) I really don't go anywhere without it anymore :)


10

From KTamas's amswer: More than one person can use the same screen, i.e. if a friend of yours ssh into your computer, then he can connect to your screen. It's great when two or three people are working on the same projects.


9

It's important to note that while some processes take CTRL+Z to mean background, the default behavior is STOP, which does not continue execution. The safest way is to run the command with an & at the end, then run "disown" to force it to the background completely. You will not be able to foreground it again, however. If you want an easy way to keep an ...



Only top voted, non community-wiki answers of a minimum length are eligible