Quirky result using mv Terminal command
I want to move some music from my hard drive to my NAS so
I go to my mp3 music folder that has subfolders in it of artists cd ...
now I use mv -v * /Volumes/Music/MP3
this MP3 folder also has all my artist folders in it
HOWEVER when it starts to move files I get something like this
U2 --> /Volumes/Music/MP3/U2/U2
U2/War --> /Volumes/Music/MP3/U2/U2/War
it takes the artist folder in my source, makes a new copy in my destination then makes a subfolder inside that
WHAT AM I DOING WRONG????
That's really odd behaviour... i occasionally use move when on the same partition and have never come across this. I tried to reproduce your problem with a collection of nested directories and cannot. Perhaps it has something to do with it being moved to a network volume... or a difference in file systems.
Anyway i would never use mv across volumes, always cp then rm instead just incase it fails. for example:
cp -Rv ~/Music/MP3/* /Volumes/Music/MP3/
Then double check it's all copied... easiest way is to get info on all the copied items and check the total bytes match the original (Command + Alt + i) in Finder. Then once satisfied remove the originals:
rm -Rv ~/Music/MP3/*
But like Linc said, unless you are really familiar with the command line and comfortable with it's unforgiving lack of safety guards... theres no reason why you can do the same in finder.
Similar Messages
-
I used a terminal command in Lion to show the LIbrary in the Users folder, and now the Finder is behaving erratically, hanging up and becoming almost paralyzed. Can anyone tell me how to reverse the terminal command for show Library. The command I used was:
chflags nohidden ~/Library/Showing the Library folder will not cause the problem you've described. Nevertheless:
chflags hidden ~/Library
will hide the folder. To reveal the folder:
chflags nohidden ~/Library
Note, there is no "/" after Library. -
How can I change the "Ask to join new networks" option using a terminal command?
We are currently switching to a new wireless network throughout our school district and I have pushed commands to connect to the new and remove the old. However, any Macs that have "Ask to join new networks" enabled are jumping over to our unsecure guest network, even if that network has been removed from the list of Preferred Networks. So far the fix has been to remove the guest network from the list of Preferred Networks and then disable Ask to join. The only issue I'm running into now is I have been unable to find a terminal command to change this setting. Once I have the command I can write a script and send that out to all of the Macs.
So is there a way to disable "Ask to join new networks" using command line?sed -i "" 's/Prompt/DoNothing/' /Library/Preferences/SystemConfiguration/preferences.plist
-
My friend provided me with a Terminal command allow me to use Cmd+Enter to send an email (muscle memory from Outlook, hard to forget!)
Command was:
defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9"
Did that, and it didn't add the Cmd+Enter instruction but removed the Cmd+Shift+D instruction, so I had NO keyboard shortcut. Then Cmd+Enter started working. For a while. Now I'm back to getting the irritating error bleep sound, and having no functional keyboard shortcut for sending mail.
Does anybody have any advice?Try
defaults delete com.apple.mail NSUserKeyEquivalents
Then, relaunch Mail. -
HT2254 is there a way to install mac widget using terminal command?
Is there a way to download and install mac widget using ther terminal command instead of using widget manager?
I need to install on a large number of macbooks, this will save me a lot of time...
Thanks,
HBI am not sure if defaults write will do the install:
http://ss64.com/osx/defaults.html -
Using Terminal Commands and Maintenance
I am trying to use the terminal commands as indicated in this article -
http://support.apple.com/kb/HT2319?viewlocale=en_US - however, the response I get is "no such directory." While I used to be able to run this maintenance command in Tiger with no problems, I cannot do it with Leopard for some reason. Suggestions?this article doesn't apply to leopard. if you want to force periodic tasks from terminal run
sudo periodic daily
etc. to run them all at once run
sudo periodic daily weekly monthly
However, leopard does a better job than tiger at running them and unless your mac is shut down at night every night it will run the tasks itself. -
Add "Serch Domain" in Network Preferences with Terminal command
Hi!
I'd like to add a Search Domain in the Network setting using a Terminal command. With this I can use ARD3 to end the command to several machines at once wihtout having to go to each machine and do it in the GUI.
I know you can write to preference files with the Terminal, but I don't know what to type.
Please help.
Thanks in advance!Hey Camelot,
You're getting a lot of mileage out of that new command. Kudos for finding it.
Hi Martin,
Naturally Camelot's command is the most elegant solution. The Systems Preferences settings for the network are stored in the /Library/Preferences/SystemConfiguration/preferences.plist property list file but I think that's only consulted at boot. The search path is too deep to be comfortably manipulated by the "defaults" command but we could probably do it with sed if that would help.
When the network comes up, the above information is combined with data from DHCP to create the /var/run/resolv.conf file, which is linked to by the classic /etc/resolv.conf file. That has a "search" field that holds the search domains in a whitespace delimited list. I don't know how often that's consulted but that's the final source of the information.
Gary
~~~~
Life would be so much easier if we could just look at the
source code.
-- Dave Olson -
Terminal command messed up my computer HELP ME!!!
I Used a terminal command to show hidden files, and I don't know how to Reverse it. HELP!!!
Hello and Welcome to Apple Discussions.
. defaults write com.apple.finder AppleShowAllFiles TRUE
Shows hidden files in the finder. Replace TRUE with FALSE to hide hidden files again.
Carolyn -
Computer not obeying terminal commands
I've been trying to eject a disk using the Terminal command "drutil tray eject" (the eject button isn't working and the computer is in denial about the disk being there- except iTunes which crashes every time I tell it to eject the disk). The Terminal is pretending that it is Text Edit- it sends me no responses to anything I type (I tried several other basic commands- nada). I tried changing my preferences in Terminal and got a response which told me what my command was supposed to do, but didn't obey the command. I got the disk out using the mouse method- but I just want the computer to obey my commands. What should I do?
1.dragging and dropping the icon for the CD into your trashcan
2. Restart the computer and after the chime press and hold down the left mouse button until the disc ejects.
3. Press the Eject button on your keyboard.
4. Click on the Eject button in the menubar.
5. Press COMMAND-E.
6. Open the Terminal application in your Appl/Utilities folder. copy & paste the following:
/usr/bin/drutil eject
If this fails then try this:
Boot the computer into single-user mode (hold down ⌘ -S through the boot process.) At the prompt copy & paste:
/usr/bin/drutil eject
Restart the computer enter reboot at the prompt or shutdown
7. restart hold down trackpad button -
I want to disable 'Spotlight' for repairing my disk "Macintosh HD" , but somehow the command 'sudo mdutil -a -i off' does not work in 'Terminal'. I get result as ' bash: sudo: command not found' .I am using OS 10.10. Please help.
It appears that you may not have a properly installed OS X system.
You must be connected to the Internet to reinstall OS X.
In the menu bar, choose Apple menu > Restart. Once your Mac restarts (and the gray screen appears), hold down the Command (⌘) and R keys.
Select “Disk Utility,” and then click Continue.
Select your startup disk from the list on the left, and then Repair Disk.
After disk is repaired, select Reinstall OS X, then click Continue.
Follow the onscreen instructions. In the pane where you select a disk, select your current OS X disk -
After transferring documents from one MacBook Pro to another I get some weird errors due to settings that seem to have transferred over. One is that the Mac App Store is disabled.
Are there any Unix / Terminal commands I can use to reset these?Forgot Your Account Password
For Lion/Mountain Lion
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
When the menubar appears select Terminal from the Utilities menu.
Enter resetpassword at the prompt and press RETURN. Follow
instructions in the dialog window that will appear.
Or see Reset a Mac OS X 10.7 Lion Password and
OS X Lion- Apple ID can be used to reset your user account password. -
Not able to get all the results if i use "get-spdeletedsite" command
Hi everyone,
I am not able to get all the results when I use the below powershell command.
get-spdeletedsite -limit all
It is giving me only one site, but infact we have more than 100 deleted sites.
If I use the normal command like below it is giving the below output
get-spdeletedsite
Can any one tell me, how can I get all the deleted sites ?
Best Regards
Anil AlladiHi Anil,
For the Limit parameter of Get-SPDeletedSite cmdlet, when we specify its value to ALL, it will return all site collections for the given scope.
For your scenario, the script “Get-SPDeletedSite –Limit ALL” will return all deleted site collections in your SharePoint environment.
If you want to get all deleted site, you can export the result to csv as below:
Get-SPDeletedSite | export-csv out.csv -notypeinformation
Reference:
http://technet.microsoft.com/en-us/library/hh286316(v=office.15).aspx
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Does anyone know whether there's a terminal command to make all applications remember/use the last directory/path where I last saved a file?
For example, let's say there are (10) ten PDF's on a website, and I want to use Preview.app to open and save each file to the same directory.
Problem is, after each time I save a file, Preview.app doesn't automatically remember/use the last directory where I saved my file(s).
Forcing me to navigate back to the same directory after each time I save a file; super-annoying.
But, for some reason, when saving images from the web, Firefox remembers the last directory where I saved the file (jpeg).
So I'm hoping there's some way, possibly a terminal command to set/force all applications (including Preview.app) to remember/use the directory/path where file(s) were last-saved.
Anyone?Get the third-party utility Default Folder X 4.4.9.
-
hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,
but i can't find my data which i have saved on mac.the storage is showing data used and free space on the disk
please help me out in this matter.How did you change your user name?
resetpassword wouldn't have done it. If you managed to create a new user, then your data is still in the old account. -
Permissions will not set, even after using terminal commands?
Hey,
I found a thread on here for using the terminal to type in commands for the user permissions and for the PSIX permissions on Leopard (10.5) server. These commands are supposed to clean the server of all underlying(hidden) permissions that you cant see and then you are supposed to be able to then set the permissions again and finally, to hit "Propagate Permissions" so that all the permissions set for the shared volume then get farmed out to all sub files/folders. This did not work when I tried it in the terminal, it said "Command not found" even after I typed in the admin password. Is there anyone out there who can tell me the actual way to fix the old permissions and get new ones set?
The story is: We had an old server on a G4 when i first took control of the server, I took the shared hard drive out of the G4 and inserted it into a G5 and started using it with the leopard server. the permissions did not really need to be set on that volume because they had carried over from the last time they were shared. But we recently just got a Drobo unit for our server and I recently transferred all the shared files and folders over to the new volume, but ever since I cant get the permissions to farm out to all the stations, it shows me that its done on the server. But when I go to access the files I am able to delete faculty folders where I had set the permissions to "read only" so I am wondering if there is a streamlined way of going about this or if I should just start from scratch and use all brand new HDD's?
Please Help!Hi ..
Try the tips mentioned here > Mini-tutorial: Force-deleting stubborn or problematic files in Mac OS X
Maybe you are looking for
-
How do I look up a web page I visited last week?
I received confirmation of an event I registered for, but I hadn't printed it out yet, before that tab disappeared when I hibernated the computer. Is there a way I can retrieve it? The history tool only shows February or earlier; this was in March. T
-
Material report showing lead time & min order quantity?
Hi, Is there a report which I can download which shows by material, the lead time and minimum order quantity? Thanks Keeley
-
How to use picture in picture in imovie 9.0.7
how can i do to use picture in picture in imovie 9.0.7
-
Accessing WebDynPro - Login Failed
Hi Facing the Login failed error , though the User exist in SRM-MDM-Catalog Repository while Using the URL http://..MDM SERVER Host../ webdynpro/dispatcher/sap.com/tc~mdmsrmui/MDM_SRM_UI_App. When it promps Server, after entering the server name ,un
-
Resetting the JSF Portlet State in weblogic portal 10.3 and JSF1.2
Hi , I have a Registration JSF Portlet. It has two pages, "Registration home Page" and " Registration confirm Page". After I,enter the Registration details on " Registration home Page" and click submit, I will get a " Registration confirm Page". Add