Tag Info

Hot answers tagged

15

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!


13

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 ...


12

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

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 ...


10

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 ...


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

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

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 ...


10

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


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 ...


9

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


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

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 ...


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

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

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

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

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


6

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 ...


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 - ...


5

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 ...


5

You need to open up and port forward ssh on whatever has your external IP address at your house. Usually this is some sort of small router. Although, at my house thats another FreeBSD box, which is probably the real way to go. Make the BSD box your router, NAT on it etc. Once you have that ready they will need a server name to use. If your home IP ...


5

Only when you disable the limitations in login.conf you can use SPACE as your password with passwd.


5

You cannot run binaries built for FreeBSD on Linux (see this question). They basically are different operating systems, sharing only a small subset of APIs (POSIX compatibility). However, if you have the source code, you can build binaries for Linux on FreeBSD; the term is "cross-compiling". For example, programs for Windows are often compiled on a Linux ...


5

Cygwin is a collection of recompiled tools typically found in a linux system plus a DLL (cygwin1.dll) that provides a compatibility layer between those tools and the underlying Windows OS. Cygwin cannot just run any POSIX program you want. You have recompile that software from scratch and it's a non-trivial thing to do. Chances of success running ...


5

Yes, you are right, you need to install fusefs-s3fs, once you have done that, make sure you put fusefs_enable="YES" somewhere in your /etc/rc.conf (so that fuse will start after a reboot). Now create a file in /etc/ called passwd-s3fs and set its perms to 640. In that file add your S3 access-key and secret key as follows: accessKeyId:secretAccessKey on ...


5

git-remote-https.core is the memory of the git-remote-https process at the time it crashed. Yes, it crashed. Why is anybody's guess. I would suggest recompiling GIT from ports and trying that. If it still crashes then I would recommend recompiling from ports but with gdb enabled, then you can use gdb to examine the core dump (as that file is known) to ...



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