Re: find -printf
On Fri, Apr 20, 2012 at 3:12 PM, Chuck Swiger cswi...@mac.com wrote: On Apr 20, 2012, at 12:08 PM, Eugen Konkov wrote: checking 'man find' there is no -printf parametr. Does FreeBSD has different version of find utility compare to linux? Yes. Linux comes with GNU find. Maybe some knows workaroud for that? Install GNU find. If you are working in a heterogenous environment, and do not want to install lots of tools for consistency, I would recommend sticking to the POSIX defined functionality/behaviors in all cases: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html If you only use functionality that is defined there, it should work on all modern find implementations, regardless of OS, etc (that's more or less the entire reason for the specification ...). For older systems you might want to stick to the 2004 specification: http://pubs.opengroup.org/onlinepubs/009604599/utilities/find.html Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: is it possible to update ports tree via svn?
2012/4/17 Eugen Konkov kes-...@yandex.ru I have found: http://wiki.freebsd.org/PortsSVN I believe this is just a proposal, and work is not yet finished. but trying to update ports tree using svn co svn://svn.freebsd.org/ports svn.freebsd.org does not have a ports tree in svn yet, per the PortsSVN page, a demo(?) server is available, I have tested the following, and it works as expected svn checkout http://svn.chruetertee.ch/ports/trunk/ says that there is no such repository is it possible to update ports tree via svn? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: current pids per tty
On Tue, Apr 3, 2012 at 12:33 PM, ill...@gmail.com ill...@gmail.com wrote: On 3 April 2012 04:19, takCoder tak.offic...@gmail.com wrote: Hi Everyone, i'm trying to find out a way to list *all* the pids of which running in the background of or as the parent *of the current tty* device my shell file is running on.. is there a quick way to find it out as for commands like tty (for current tty) or whoami (for current user) or i should just grep and sed the output of commands like w or ...? as you may know, W(1)'s output just shows the number of pts devices in its tty column.. so it won't be that easy to grep them all(i'm somehow new in shell scripting as well).. and i need the detailed info about related processes; like FROM or WHAT outputs of w command.. (BTW, i'm trying to write a reporting per-tty shell script for my FreeBSD system..) it would be very kind of you giving me any tips or tricks on this. tcsh sh both have a builtin called jobs (there is an executable named /usr/bin/jobs, but . . . well run cat /usr/bin/jobs see for yourself). I dunno if that encompasses everything you want to do. Across all TTYs, something like this would probably work: sudo fstat | awk '$5 ~ /^\/dev/ $8 ~ /tty/ { printf %s %s %s\n, $1, $8, $3; }' | sort -k1,2 from there, if you think you need to trace the process trees down, you can use this list of pids and ps to do the rest ... hopefully that helps -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Inquiry from University student
On Wed, Mar 14, 2012 at 2:07 PM, Robert Bonomi bon...@mail.r-bonomi.comwrote: From owner-freebsd-questi...@freebsd.org Wed Mar 14 12:47:15 2012 Date: Thu, 15 Mar 2012 01:36:28 +0800 From: Kuan Ming Tan c3138...@uon.edu.au.r-bonomi.com To: freebsd-questions@freebsd.org Cc: Subject: Inquiry from University student Hi, Im a bachelor student currently runs a project related to FreeBSD, can you provide some example of organizations which using FreeBSD? Hope to receive your reply soon! Apple. Sony. Juniper Systems. just to name a few. eadler sent this link out on the nyc*bug talk list earlier in the week, an incomplete list, but a good one: http://en.wikipedia.org/wiki/Commercial_products_based_on_FreeBSD ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Which compiler compiled system?
On Mon, Mar 12, 2012 at 6:55 PM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: On 03/13/12 06:49, Pierre-Luc Drouin wrote: If Java is broken, then you know FreeBSD was compiled with clang... I wouldn't say that is categorical. On Mon, Mar 12, 2012 at 3:45 PM,kalth...@googlemail.com wrote: Hi, Is there a way to determine whether a FreeBSD-system was compiled with gcc or clang? I thought of some libs or so that might significantly differ. strings on a clang v. gcc compile shows no differences (at least in my tests), but binaries compiled with clang and gcc seem to reliable show differences at the 25th character of the compiled program, although the differences at the 25th character are not consistent across programs ... $ # one example $ gcc -Wall -o hello_world.gcc hello_world.c $ clang -Wall -o hello_world.clang hello_world.c $ cmp hello_world.gcc hello_world.clang hello_world.gcc hello_world.clang differ: char 25, line 1 this does suggest that if you know gcc and clang are the only 2 options for compilation on a system, and you have a version compiled with the same flags on the same system from a known compiler, you should be able to reliably detect compilation by the other compiler using cmp ... although this may be more or less meaningless to you depending on how much control you have over the variables (e.g. binaries built on the same system, ability to know which compilation flags were sent at compile time, etc ...): $ # hello_world here is ``in the wild'' $ clang -Wall -o hello_world.clang hello_world.c $ if cmp hello_world.clang hello_world /dev/null 2 /dev/null; then echo built with clang; else echo built with gcc; fi built with clang Regards, kaltheat __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Still having trouble with package upgrades
On Wed, Mar 7, 2012 at 3:20 PM, Andrew Gould andrewlylego...@gmail.comwrote: On Wed, Mar 7, 2012 at 1:12 PM, Benjamin Tovar b...@robotoloco.com wrote: On Wed, Mar 07, 2012 at 12:57:46PM -0500, David Jackson wrote: So it seems like a happy compromise here. You will get what you need and us newbies and other users who really dont want the extra trouble of compiling will get our binaries. Everyone gets what they want and is happy, it seems. Yes, this sounds awfully good, except that I think it is much harder than you think. First, some options are mutually exclusive (i.e. ncurses vs slang)... so, maybe there are two, or three versions of the same package... and again, this sounds awfully good, except for the limited and volunteered time of a port maintainer. A happy compromise might be then to have binary packages of popular ports, which is how we have it now. Second, and I think this the most important reason, ports put the responsibility of the system on the user. They force you to make decisions on exactly what software is installed. You want the stability and freedom of FreeBSD without this responsibility, and this seems very hard to compromise (e.g., macosx and most linux distributions remove the responsibility by making all these choices for you). Is this newbie friendly? Probably not. Does it need to be? Well, it would be nice if more people use it, but if we remove the responsibility from the user, then it would not be FreeBSD, it would be something else. (Like Debian GNU/kFreeBSD, which sounds like what you are looking for.) There is a port of apt (sysutils/apt) which you can install, and use to maintain your system via apt repositories. Not sure if anyone is maintaining an apt repository out in the world, for use with FreeBSD. -- Benjamin Tovar It is not newbie friendly. As a non-techie (CPA), however, I can tell you that it makes the user a better user; and **that** is a good thing. Some things are worth doing. :-) Andrew ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: /usr/home vs /home (was: Re: One or Four?)
On Sat, Feb 18, 2012 at 5:46 PM, Michael Sierchio ku...@tenebras.comwrote: man hier man 7 hier makes no mention of /home or /usr/home at all ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 'rm' Can not delete files
On Fri, Feb 10, 2012 at 10:51 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: On 02/11/12 01:34, Henry Olyer wrote: So what do I change if I want to increase the shell's file limit? I don't think you can. It's not a shell limit. It's a limit to the number of arguments the command itself will take. As said, the shell expands '*' to a list of files as the argument, and rm is limited to the number of arguments it will parse. I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for uniq -c I use %06 instead of %d because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? There's not really much difference in this factor for shell types; as for changes you'd have to hack the command's (say rm) code. As mentioned, I'd use the find -delete combination. I think the only thing that would give you this sort of pseudo-granularity of MAX_ARGS (and ARG_MAX) control at run-time is xargs with the -s and -n options ... a play on andrew's earlier example: find . -type f -depth 1 -print0 | xargs -n99 -0 -s8192 -c5 rm -- or some such, depending on your needs, I believe in most situations this particular invocation will also out-perform find ... -delete. On Wed, Feb 8, 2012 at 10:25 PM, andrew clarkem...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 'rm' Can not delete files
On Fri, Feb 10, 2012 at 11:04 AM, Matthew Story matthewst...@gmail.comwrote: On Fri, Feb 10, 2012 at 10:51 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: On 02/11/12 01:34, Henry Olyer wrote: So what do I change if I want to increase the shell's file limit? I don't think you can. It's not a shell limit. It's a limit to the number of arguments the command itself will take. As said, the shell expands '*' to a list of files as the argument, and rm is limited to the number of arguments it will parse. I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for uniq -c I use %06 instead of %d because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? There's not really much difference in this factor for shell types; as for changes you'd have to hack the command's (say rm) code. As mentioned, I'd use the find -delete combination. I think the only thing that would give you this sort of pseudo-granularity of MAX_ARGS (and ARG_MAX) control at run-time is xargs with the -s and -n options ... a play on andrew's earlier example: find . -type f -depth 1 -print0 | xargs -n99 -0 -s8192 -c5 rm -- the -c5 here should read -P5 ... apologies. or some such, depending on your needs, I believe in most situations this particular invocation will also out-perform find ... -delete. On Wed, Feb 8, 2012 at 10:25 PM, andrew clarkem...@ozzmosis.com wrote: On Tue 2012-02-07 23:17:16 UTC+, RW (rwmailli...@googlemail.com) wrote: On Tue, 07 Feb 2012 22:14:56 + Matthew Seaman wrote: ls -1 | xargs rm but be aware that that wont work for filenames with spaces. In addition, I don't believe it solves the OP's initial problem of the argument list being too long! You'd probably need to use the xargs -n switch here. The above will also try to 'rm' directories, which won't work. Instead I would use 'find': find . -type f -depth 1 -delete This will also work with filenames with spaces. Or the scenic route, using xargs, with one rm per file (slower): find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f (The scenic route is useful if you want to do something else with the files instead of deleting them with rm.) Regards Andrew __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org -- regards, matt -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Mon, Jan 23, 2012 at 12:01 PM, per...@pluto.rain.com wrote: kpn...@pobox.com wrote: Lattice C Later bought out by Microsoft IIRC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org Adam David Alan Martin did a very nice intro to CLANG at NYC*BUG in October, in particular the comparison of ease of use with gcc is very nice here: October 5, 2011. ADAM David Alan Martin on Clang on FreeBSD.http://www.fetissov.org/public/nycbug/nycbug-10-05-11.mp3 http://www.fetissov.org/public/nycbug/nycbug-10-05-11.mp3can't seem to find the slides for the talk, maybe someone from admin@nycbug has a link they can share. -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org