Berkeley CSUA MOTD:Entry 11957
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2004/1/26-27 [Computer/SW/OS/OsX, Computer/SW/Unix] UID:11957 Activity:high
1/26    I just transfered several thousand files from a Mac to a PC. Macs don't
        have file extensions so is there any UNIX utility (or PC utility) that
        will differentiate between word and excel files so that I can
        programmatically add the .xls and .doc extensions? "file" simply says
        "Microsoft Word" document.
        \_ write an applescript.  Unfortunately, I don't know the syntax for
           grabbing creator codes from the finder.  Maybe someone else on
           here does.  Applescript documentation is horrible.
        \_ What I ended up doing was using perl to traverse the directory
           hierarchy. I changed all :'s to -'s (PCs don't like :'s) and add
           .xls extensions to each file. This is somewhat lame, but 95% of
           the files are excel files and I was able to do this in less than
           10 minutes (I already had the perl readdir traversal code handy,
           I just had to find it)... of course, I did all this before asking
           on the motd bc i didn't think i'd find any useful information here.
           I'd still be interested in a nice solution (ideally, someone would
           tell me that I just need to upgrade my version of file)
           \_ you should rename the files while they are on the Mac.
              http://www.versiontracker.com/dyn/moreinfo/macosx/14404
              \_ link not found and this is System 7 we're talking about.
                 \_ DEAR GOD WHY???
                    Uh.  can you transfer them to a more modern mac first?
                    \_ It only took him 10 minutes this way.
          \_ 'file' depends on the 'magic number' which is stored in a file.
             you only really needed an updated magic file.
        \_ This came up on google under "automatically macintosh file
           extensions".  I bet you can find more:
           http://peccatte.karefil.com/software/MacNames/MacNamesEN.htm
        \_ using perl, you can issue the file command recursively through
           your dirtree and dump the results into a text file. You can
           then open up the text file and issue a rename accordingly to
           each of the files it finds. Should take about an hour to write
           up in perl. -williamc
           \_ An hour?  It should take about 5 minutes in any shell.  On a
              bad day.  Between commercials and surfing.  This is a good
              time for sed/awk for those too lazy to use the search/replace
              function on their text editor.
              \_ Hmmm, apparently you don't do any "shell scripting" on a PC
                 in Windows/DOS.
                 This can be done in five minutes on a UNIX machine, but
                 with Windows through a DOS VM box (assuming you're not
                 using cygwin) I'd have to spend some time testing it to
                 make sure it was functioning correctly. If using
                 the find command you'd have to figure out how to
                 dump the information into an intermediate text file
                 and parse the contents. Regardless, I'd like to see
                 your five minuts solution posted on the motd, it will
                 be informative. Also, wtf does does your text editor
                 have to do with identifying binary files??? Reading
                 comments like these makes you think that the poster
                 didn't understand the problem domain. -williamc
                 \_ i'm not the guy above, but you might want to consider
                    posting anonymously, lest people associate "williamc"
                    with "talking out of his ass". cygwin often works
                    *just fine*, and i don't see any reason to believe it
                    wouldn't in this case. as the OP has already mentioned
                    though, 'file' doesn't give enough information to
                    distinguish between word and excel files. but even
                    supposing it did, you would either want to use sed/awk
                    to massage the output into an easier to parse format,
                    or use a text editor to do it if you don't know how
                    to use sed/awk. perhaps you should keep quiet instead
                    of making an ass of yourself next time.
              \- ObEmacsDiredMode --psb
        \_ What I ended up doing was using perl to traverse the directory
           hierarchy. I changed all :'s to -'s (PCs don't like :'s) and add
           .xls extensions to each file. This is somewhat lame, but 95% of
           the files are excel files and I was able to do this in less than
           10 minutes (I already had the perl readdir traversal code handy,
           I just had to find it)... of course, I did all this before asking
           on the motd bc i didn't think i'd find any useful information here.
           I'd still be interested in a nice solution (ideally, someone would
           tell me that I just need to upgrade my version of file)
ERROR, url_link recursive (eces.Colorado.EDU/secure/mindterm2) 2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2008/4/21-2009/5/3 [Computer/SW/OS/Linux] UID:49792 Activity:nil 61%like:42770 55%like:52942
Linux soda 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux
Welcome to Macintosh^H^H^H^H^H^H^H^H^HSoda Mark VII,
a dual Xeon 2.8GHz with many hozers.
	...
2006/4/15-2008/4/21 [Computer/SW/OS/Linux] UID:42770 Activity:nil 61%like:49792
Linux soda 2.6.16.5-soda0 #1 SMP Wed Apr 12 18:06:46 PDT 2006 i686 GNU/Linux
Welcome to Macintosh^H^H^H^H^H^H^H^H^HSoda Mark VII,
a dual Xeon 2.8GHz with many hozers.
	...
2007/8/31-9/3 [Computer/SW/OS/OsX] UID:47845 Activity:nil
8/31    original macintosh user manual:
        http://www.peterme.com/?p=583
        \_ "...... every photo shows a preppy white male using the
           computer. ...  (The dude in Chapter 4 even has a *sweater* around
           his shoulders!!!)"
           Was a sweater a White thing in the '80s?
	...
2006/11/17-28 [Computer/SW/OS/Windows] UID:45346 Activity:nil
WindowsXP soda sp2-2800.4.0 #1 SMP Wed Nov 17 11:23:46 PDT 2006 i686 Cygwin
Welcome to Macintosh^H^H^H^H^H^H^H^H^HSoda XP SP2,
a dual Xeon 2.8GHz with many hozers.
The uncensored messages below this line may not reflect opinions of the CSUA.
	...
2006/10/5-7 [Computer/SW/OS/OsX] UID:44690 Activity:nil
10/6    I love Macintosh, I've had a G4 and other Apple related products
        but I've returned my MacBook Pro v.1 for the following reasons:
        - 7 pounds!!!
        - When idling on single proc, it is very hot
        - When idling on single proc, it only runs 1.5 hour. Slightly more
          when the LCD is turned off for the entire 1.6 hour
	...
2006/6/22-26 [Computer/HW/CPU] UID:43465 Activity:nil
6/22    http://www.theinquirer.net/?article=32566
        Intel hosts LAN party on Arizona campus.
        60% bring AMD computers, 37% bring Intel.
        \_ Semi-related factoid: The Windows Startup sound was created on an
           Apple Macintosh.
	...
2005/12/4-2006/4/7 [Computer/SW/OS/FreeBSD] UID:40835 Activity:nil
FreeBSD 5.3-RELEASE (MKVII) #0: Fri Dec 17 17:40:05 UTC 2004
Welcome to Macintosh^H^H^H^H^H^H^H^H^HSoda Mark VII,
a dual Xeon 2.8GHz with many hozers.
	...
2006/2/13-20 [Recreation/Computer/Games] UID:41824 Activity:moderate
2/13    What are your favorite old school computer games?
        \_ Recently rediscovered Pathways into Darkness http://pid.bungie.org
           \_ The skill levels for weapons was a cool innovation for a fps.
        \_ BEYOND CASTLE WOLFENSTEIN
        \_ Jumpman Jr.
        \_ The Pawn (C64 - 1985?), Conan (various 1986?)
	...
2005/11/9-11 [Computer/SW/OS/OsX, Computer/HW/Drives] UID:40518 Activity:nil
11/9    What do you do when the OSX disk utility (booted from CD) fails
        to repair your primary startup disk and gives you the error:
        "Invalid B-tree node size"? This is an iMac G5 and it cannot boot
        from the Macintosh HD. Any recommendations for data recovery?
        \_ DiskWarrior
           \_ Thanks.
	...
2005/5/20-23 [Computer/SW/OS/OsX, Computer/HW/Drives] UID:37786 Activity:nil
5/20    Reading tech support stories.  This page is by far the funniest
        I've seen yet.
        http://rinkworks.com/stupid/cs_smoke.shtml
        \_ Heh.
          * Customer: "Hi. I have a Macintosh. I had a disk that I wanted to
            put in the computer, but it wouldn't go, so I pushed harder, and
	...
2004/11/10-11 [Computer/SW/WWW/Browsers] UID:34813 Activity:kinda low
11/10   Now that FF 1.0 is out, has anybody gone back and compared, say,
        startup times to older versions (maybe even Phoenix)?  Is FF still
        a great deal faster than mozilla?  I remember using phoenix and
        thinking that it was maybe 2x faster for startup, as compared to
        mozilla.
        \_ I don't know about Mozilla, but startup time for FF 1.0 on OSX
	...
2004/8/4-5 [Politics/Domestic/Election, Computer/SW/OS/OsX] UID:32697 Activity:nil
8/4     Two hotbutton topics for the price of one!
        Picture of John Kerry using a macintosh:
        http://i.timeinc.net/time/covers/1101040719/teamup/images/03.jpg
        \_ http://www.theapplecollection.com/various/Celebrity/GBush.html
        \_ Mamby pamby liburls and they're macintushes!
	...
2012/8/29-11/7 [Computer/SW/Security] UID:54467 Activity:nil
8/29    There was once a CSUA web page which runs an SSH client for logging
        on to soda.  Does that page still exist?  Can someone remind me of the
        URL please?  Thx.
        \_ what do you mean? instruction on how to ssh into soda?
           \_ No I think he means the ssh applet, which, iirc, was an applet
              that implemented an ssh v1 client.  I think this page went away
	...
2012/3/29-6/4 [Computer/HW/Memory, Computer/HW/CPU, Computer/HW/Drives] UID:54351 Activity:nil
3/29    A friend wants a PC (no mac). She doesn't want Dell. Is there a
        good place that can custom build for you (SSD, large RAM, cheap video
        card--no game)?
        \_ As a side note: back in my Cal days more than two decades ago when
           having a 387SX made me the only person with floating-point hardware,
           most machines were custom built.
	...
2012/1/27-3/26 [Computer/SW/Unix] UID:54299 Activity:nil
1/27    Interesting list of useful unix tools. Shout out to
        cowsay even!
        http://www.stumbleupon.com/su/3428AB/kkovacs.eu/cool-but-obscure-unix-tools
        \_ This is nice.  Thanks.
	...
2011/10/26-12/6 [Computer/SW/Unix] UID:54202 Activity:nil
10/24  What's an easy way to see if say column 3 of a file matches a list of
       expressions in a file? Basically I want to combine "grep -f <file>"
       to store the patterns and awk's $3 ~ /(AAA|BBB|CCC)/ ... I realize
       I can do this with "egrep -f " and use regexp instead of strings, but
       was wondering if there was some magic way to do this.
       \_ UNIX has no magic. Make a shell script to produce the ask or egrep
	...
2010/3/10-30 [Computer/SW/Mail] UID:53751 Activity:nil
3/10    What email program do people in Cal CS use nowadays?  In my school days
        people used /usr/bin/mail, then RMail in emacs, then VMail in emacs.
        After my days people used Elm, Pine, Mutt (I forgot which order).  In
        my first two jobs we could tell the seniority of fellow engineers based
        on which email program they use at work, because everyone used what
        they used to use in their school years.  In my last two jobs though,
	...
2009/11/13-30 [Computer/SW/Unix] UID:53523 Activity:nil
11/12   How does one find out if a system has rootkit installed?
        \_ Unix or m$?
           \_ Unix. On M$ I always assume it's compromised.
              \_ Install Tripwire before you plug your server into The Net?
                 The only other answer I can think of is to reinstall the
                 OS from scratch on another server and do an md checksum
	...
2009/9/4-12 [Computer/SW/OS/FreeBSD] UID:53331 Activity:kinda low
9/4     I'm seriously very happy Soda no longer runs FreeBSD.
        FreeBSD is really going down the tubes
        http://freebsdgirl.com/2009/08/its-a-dirty-job-but-someone-ha.html
        \_ funny, I dont remember it geting pwned anywhere near as many tmies
           as it has since the switch to Linux.  And that blog post is
           only abou the installer, not the running OS
	...
2009/7/24-29 [Computer/SW/Editors/Vi] UID:53195 Activity:low
7/24    Is dos2unix available somewhere?  Someone added all those Ctrl-M's to
        motd.public.
        \_ %s/^V^M//g in vim. What has your editor done for you today?
           \_ that works great in vi actually... in vim :set filetype=unix
	...
Cache (845 bytes)
www.versiontracker.com/dyn/moreinfo/macosx/14404
Yes No Great product, few flaws kestrelx_dotmac Version: 30, 3/31/2004 03:01PM PST This is an excellent renamer for files. It should really use the column view metaphor from the finder for renaming files for letting you continually work with the files to do various operations on them. Yes No Everyone should have this jmunkki Cameraid Version: 30, 3/15/2004 03:36AM PST For a free program, this is absolutely wonderful. I bought A Better Finder Rename a few years ago, but in many ways I like this program better. Yes No View All 80 Email Us Submit a File RSS / XML Feed Developers . JUMP TO Software Category Audio Business DeveloperTools Drivers DTP/Prepress Educational Finance Font Tools Games Graphics HTML Tools Internet Utilities Math/Scientific Multimedia Network/Admin Screensavers Security System Utilities Utilities Word Processing .
Cache (1548 bytes)
peccatte.karefil.com/software/MacNames/MacNamesEN.htm
Has been awarded a 4 stars at ZNDnet review Affiliation There are many applications allowing to rename filenames for cross-platform purpose. Benefits : * automated renaming process is on a Server instead of on a Macintosh Workstation * there is no network overhead * MacNames checks continuously predefined folders to ensure file names compatibility * when used as a Windows NT or 2000 or XP Service renaming files with illegal file names it increases productivity and is part of administrators toolkit focused on cross-platform needs. In addition, Macintosh files do not need any extensions. A Quark XPress document named Advert 2003/01/11 - an usual name in Macintosh world - is not easily handled by Windows applications. Moreover this document has no icon and cannot be opened using double-click under PCs. The renamed document is then usable by Windows applications, gets its Windows icon and can be opened using a double-click. So you can use it to convert Quark Macintosh filenames to windows. Each folder can be processed using its specific interval for update * Setting performance * Stores in Log files the list of files renamed. Screen Shot : Online help for detailed instructions to work with MacNames (F1) MacNames Main Screen 17 Configuration sub-menu screen 18 Download MacNames 2589 Kb Registration : 19 Contact Evaluation version is complete but needs a registration key to be fully operational if you decide to keep it. With demo download you will be able to process three folders, get a reminder message after renaming processes.