New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Running Windows (or anything else) on your Mac Discussion of Classic or running Windows, Linux and other OSes on the Mac.

mv -u ??


Post Reply New Thread Subscribe

 
Thread Tools
xinelo

 
xinelo's Avatar
 
Member Since: Jan 03, 2007
Location: Barcelona
Posts: 24
xinelo is on a distinguished road
Mac Specs: MacBook Intel 2 Core Duo

xinelo is offline
Hello,

<blabla>

I started using a MacBook a week ago. Coming from the Linux world, initially I intended to erase the Mac OS X or keep it with a dual boot with Ubuntu but I was so impressed that I decided to give it a chance. I find it very beautiful, user-friendly and robust, but I still miss many things I can do in Linux but not in Mac.

I'm surprised about that, I thought the command line part of the two operating systems would be more alike, although for many of them, after fiddling around a bit I usually find an alternative way to doing the same thing.

</blabla> <the thing>

However, yesterday I found that some basic commands, such as mv, don't work in the same way in the Mac OS X Terminal and in the Linux shell. Comparing the man pages for mv confirmed this. The update option (mv -u), for example, used to move only when the SOURCE file is newer than the destination file or when the destination file is missing, does not appear in the man mv for Mac OS X. In fact, from all the options that linux mv offers, only -f, -i, -n and -v are available in Mac.

My question is twofold: Why is this? And what can I do to overcome this and have the same command line functionality as I had in linux?

</the thing>

Thanks for any reply you might want to give.
xinelo
QUOTE Thanks
???

 
???'s Avatar
 
Member Since: Dec 25, 2006
Location: Japan
Posts: 333
??? is on a distinguished road
Mac Specs: MBP 2.0Ghz

??? is offline
Well, why is this. Its simple, one is linux one isn't. As for the same functionality I don't know, but I am interested.

I came from a linux world, but my intentions was to forget command lines as I wanted simplisty. I am going to play with the command lines and see what happens.
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
That is just one of the many things that are different with each flavor of unix. Not all commands work the same way, in each version of unix.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
caribiner23

 
caribiner23's Avatar
 
Member Since: Feb 06, 2005
Location: Chicago
Posts: 1,499
caribiner23 is just really nicecaribiner23 is just really nicecaribiner23 is just really nicecaribiner23 is just really nicecaribiner23 is just really nice
Mac Specs: MacBook Pro Retina 13" among far too many other Apple products

caribiner23 is offline
The neat thing for me is that I came from the Sun Microsystems and NeXT worlds, so the shell and command line are waaaaaay familiar to me.

And it's worth noting that Linux and UNIX are not the same operating system. Unices differ among distributions, as to Linuces.

I found this neat little graphic on Wikipedia that illustrates the lineage of the various flavors of UNIX.
QUOTE Thanks
MacHeadCase
Guest
 
Posts: n/a

Quote:
Originally Posted by caribiner23 View Post
The neat thing for me is that I came from the Sun Microsystems and NeXT worlds, so the shell and command line are waaaaaay familiar to me.

*Snip*
[Off Topic]

I would imagine you know RacerX (David Shaw) then, caribiner23?

[/Off Topic]
QUOTE Thanks
xinelo

 
xinelo's Avatar
 
Member Since: Jan 03, 2007
Location: Barcelona
Posts: 24
xinelo is on a distinguished road
Mac Specs: MacBook Intel 2 Core Duo

xinelo is offline
Thanks, everyone, for your answers. xinelo
QUOTE Thanks
novicew

 
novicew's Avatar
 
Member Since: Jan 04, 2006
Location: Hamburg, Germany
Posts: 1,385
novicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to all
Mac Specs: MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)

novicew is offline
If you are interested in using native linux commands in OS X try Darwin Port or Fink(my choice). The Open Source community ported many Linux apps. to run in X11 just as you would do in any Linux distro. You can even install Gnome, KDE, etc on top of X11, if you like.
QUOTE Thanks
cazabam

 
cazabam's Avatar
 
Member Since: Jun 06, 2006
Posts: 1,153
cazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of light
Mac Specs: MacBook 2.0GHz White, 512MB RAM, 60GB HDD

cazabam is offline
The thing is, the Mac OS X command line utilities are the same as the ones in the various BSDs and (I think) stuff like Solaris. Linux is, in fact, the odd one out. The BSD implementations that are used by OS X (Darwin), FreeBSD, NetBSD, OpenBSD et al are slightly different from the GNU ones that pretty much universally have Linux as the kernel.
QUOTE Thanks
caribiner23

 
caribiner23's Avatar
 
Member Since: Feb 06, 2005
Location: Chicago
Posts: 1,499
caribiner23 is just really nicecaribiner23 is just really nicecaribiner23 is just really nicecaribiner23 is just really nicecaribiner23 is just really nice
Mac Specs: MacBook Pro Retina 13" among far too many other Apple products

caribiner23 is offline
Quote:
Originally Posted by MacHeadCase View Post
[Off Topic]

I would imagine you know RacerX (David Shaw) then, caribiner23?

[/Off Topic]

Only if he was on one of the boat trips NeXT used to sponsor for their customers... :-)

OS X's command line shell is a lot like NeXTStep's, and no surprise there.

It's also similar to SunOS (pre-Solaris) and DEC UNIX (which became OSF/1) which are both pretty close to "pure" BSD.
QUOTE Thanks
mac57

 
mac57's Avatar
 
Member Since: Apr 29, 2006
Location: St. Somewhere
Posts: 4,560
mac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant future
Mac Specs: iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM

mac57 is offline
As is pointed out above, Mac's Terminal shell is based on FreeBSD. This is not the same as Linux, although close. Happily, the usual "man" command works just fine, so you can always check out the options for your favorite commands such as "rm" before you try them. You can also find the man pages for FreeBSD available on the web to help you.

My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
I was on the Mac-Forums honor roll for September 2007
QUOTE Thanks
xinelo

 
xinelo's Avatar
 
Member Since: Jan 03, 2007
Location: Barcelona
Posts: 24
xinelo is on a distinguished road
Mac Specs: MacBook Intel 2 Core Duo

xinelo is offline
Thanks.

So I suppose it's a question of either getting used to the BSD command style and learning to do things differently or installing Fink (and X11). However, what exactly would be the application to install with Fink to get the Linux commands?

Is there a way to run applications through Fink in Aqua (withough installing X11)?

I was aware Darwin is based on BSD unix but didn't expect this kind of differences. I thought all the *nix varieites were quite alike in this regard. I've been a Linux user for a couple of years with occasional contact with a unix console (via putty) or with ksh but had never realized any command worked differently. I had not used any BSD system, though.

Thanks a lot for your help! xinelo
QUOTE Thanks
mac57

 
mac57's Avatar
 
Member Since: Apr 29, 2006
Location: St. Somewhere
Posts: 4,560
mac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant future
Mac Specs: iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM

mac57 is offline
I have installed a full set of open source apps on my Mac using DarwinPorts. Irrespective of Fink vs. Darwin ports, you should be able to go to your favorite Linux system and use its package manager to find the package name that contains the really basic stuff like ls, rm, cp, etc. Install that package (I don't have my Linux system up and running, so I am not sure what it is) via Fink. In pretty much all Linux systems I have seen, that package has the same name - I just can't remember what it is!

Then you will have to modify your .bashrc to change your PATH so that bash scans your Fink bin collection before /bin, which has the default Mac stuff in it.

My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
I was on the Mac-Forums honor roll for September 2007
QUOTE Thanks

Post Reply New Thread Subscribe


« Can I ccess MAc partition/files from Windows?? | Partioning Trouble! »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 08:50 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?