Tag Info

Hot answers tagged

17

Proof it all adds up - I present the 'holy grail' of remote mirror commands. Thanks to davr for the lftp suggestion. lftp -c "mirror --use-pget-n=10 --verbose sftp://username:password@server.com/directory" The above will recursively mirror a remote directory, breaking each file into 10 threads as it transfers!


16

The signals described in the original POSIX.1-1990 standard: Signal Value Action Comment ------------------------------------------------------------------------- SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process SIGINT 2 Term Interrupt ...


14

in /etc/rc.conf: ifconfig_em0="inet 192.168.0.254 netmask 255.255.255.0" defaultrouter="192.168.0.1" 192.168.0.254 -- the machine IP, 192.168.0.1 -- gateway These settings in rc.conf are looked up in the boot process. If you'd like to set ip manually, run: ifconfig em0 inet 192.168.0.254 netmask 255.255.255.0 route delete default; route add default ...


14

systat -ifstat 1 Is much better. You gonna get traffic throughput, Peak and Total.


14

You can actually delete /dev/null as user root on Linux and BSD systems. Of course once system is rebooted /dev/null will be restored. Without rebooting also it is possible to restore /dev/nullusing mknod command.


12

FreeBSD - This is not a Linux distribution, but rather a member of the BSD family which is mainly focused on being a mainstream server platform and supporting as much i386 hardware as possible. It supports the most x86 hardware out of all the BSDs, but likely not what you're after for a development platform unless you're programming server-side software. ...


12

With ffmpeg there's no way I know to get the length as a variable you can use on a script. But mp3info does. mp3info -p "%S" sample.mp3 // total time in seconds


12

kill -l shows us all signals. Following this hint 3 means SIGQUIT


12

When a process remains in the process table as this process has, then you need to kill its parent process. First, find the parent process PID: ps -eo 'pid,ppid,comm' | grep 97442 Then run kill <pid> for whatever the ppid result is. (Give it a chance to die cleanly, first.) The traditional Unix design keeps process information around for the parents ...


11

If you know you are 'ssh'ed, but don't know from where, try w at a command-line. The output includes a FROM field which may be useful.


10

ffmpeg will print everything it knows about the file if you don't give it any other arguments. Use grep to strip out everything but the "Duration": $ ffmpeg -i foo.mp3 2>&1 | grep Duration Duration: 01:02:20.20, start: 0.000000, bitrate: 128 kb/s You could also use mplayer. Grep for line "ID_LENGTH=": $ mplayer -ao null -identify -frames 0 ...


10

The whois command looks for the string "Whois Server:" in the output and, if found, will issue the same query again to that server. This is what you want, except it only works for the first match. You can use a command like whois "domain apple.com" to get just one match from the default server, but markmonitor (used by apple.com) does not accept that ...


9

You simply need to edit /etc/ttys to prompt for a password in single user mode, although keep in mind anyone with physical access to the machine can still retrieve your data through various methods. you will find a line that looks like this which is tab delimited in /etc/ttys: console none unknown off secure change the secure part to insecure (very ...


8

There are a couple tools that might work. LFTP - supports FTP, HTTP, and SFTP. Supports using multiple connections to download a single file. Assuming you want to transfer a file from remoteServer to localServer, install LFTP on localServer, and run: lftp -e 'pget -n 4 sftp://userName@remoteServer.com/some/dir/file.ext' The '-n 4' is how many ...


8

It seems that (at least in September 2009) the following uses GeekTools Whois Proxy, which is quite smart in figuring out which whois-server to use. This also works for other TLDs than com, net and org: whois -h whois-servers.net apple.com Or, according to a very old hint at macosxhints.com: whois -h geektools.com apple.com I found this by accident: ...


7

Permissions - unless you are running as root (super-user) or possibly one of a select few other users or groups (bin or sys), you do not have write permission in the /dev/ directory, and therefore cannot remove anything from the directory. If you are root, then you could remove it - but your system would be extremely unhappy. You could recreate it, using ...


7

Seems it doesn't do much at all: Apple mailing list link "I'm going on some old memories here, so I cannot provide a very detailed explanation, but the reason /usr/bin/cd exists is due to a POSIX requirement that relates to aliases and being able to not use an alias via escaping. But /usr/bin/cd is a useless script since if you run cd within a shell ...


7

First, you don't need the brackets. Second, you need extended regular expressions or escape the pipes. One of this should work: egrep -e "something|someplace|somewhere" /data/rawlog.txt grep -e "something\|someplace\|somewhere" /data/rawlog.txt If you want to place something outside of the fork, don't forget to group it. For example, if you want these ...


7

You can run dd on the running disk. Doing so when there are heavy changes to the disk structure should be avoided. Also you should fschk the destination once you are done. The quieter the system is during the backup the better. Running a cold backup (file system unmounted) is the best option if you want to use `dd'. There are better options for backing ...


7

Somewhat of a subjective question, so it kinda depends on your perspective. Package management, device management, network config and similar things are all done with different commands. But the concepts are the same. You have packages (usually), you install them, etc. You have networks, you connect do them. Conceptually, not that much different. ...


6

Generally, you want to create x264 video within an MP4 container, so the following should be enough. Make sure to replace input name and CRF options. The latter sets the quality, where sane values range from 19 to 25 – lower means better quality, but also higher bitrate: ffmpeg -i input.avi -c:v libx264 -crf 22 -c:a libfaac -movflags faststart output.mp4 ...


6

It is technically possible (as in "shooting-yourself-in-the-foot"), but highly unadvisable, especially if any of the disk's partitions are writable. Picture this scenario: dd starts reading the disk at the start, and merrily makes its way towards the end. When it's halfway there, the OS writes a file to the disk. The file is somewhat fragmented though - ...


6

You mean /etc, do you? (I was just guessing because you misspelled it three times)


6

If you want to perform host discovery, don't use broadcast pings, just simply ping each possible permutation for a given subnet. It sounds heavy, but it actually takes seconds (brackets are important): $ time ( s=192.168.0 ; for i in $(seq 1 254) ; do ( ping -n -c 1 -w 1 $s.$i 1>/dev/null 2>&1 && printf "%-16s %s\n" $s.$i responded ) ...


6

Try this: % kldload coretemp % sysctl -a |grep temper dev.cpu.0.temperature: 60 dev.cpu.1.temperature: 60 dev.cpu.2.temperature: 64 dev.cpu.3.temperature: 64 Also check if FreeBSD has modules for your ACPI-chip: ls /boot/kernel |grep ^acpi acpi.ko acpi_aiboost.ko acpi_asus.ko acpi_dock.ko acpi_fujitsu.ko acpi_ibm.ko acpi_panasonic.ko acpi_sony.ko ...


6

Aha, FreeBSD. That's tcsh, I believe. So: set path=(/sbin $path)


6

Those indicate extended attributes. Try this: $ ls -a -l -@ total 1576 drwxr-xr-x+ 76 paul staff 2584 Apr 13 17:52 . drwxr-xr-x 5 root admin 170 Aug 22 2009 .. -rw-r--r--@ 1 paul staff 24580 Feb 28 22:07 .DS_Store com.apple.FinderInfo 32


5

Any system that's physically accessable has the potential to be insecure. Even if your installed OS is secure, someone could, in theory use a live disk to edit security settings, reset passwords, or simply get data out. I suppose you have to disable USB and cd boot and lock the bios to be totally safe. And even then someone could always take th HDD out. I ...


5

"Problem Reports". I found a link: http://portsmon.freebsd.org/



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