Finding locked files

I would like to look through my drive for locked files. I cannot find a way to search for them either with the Finder or with a terminal application.
Does someone know how I might do this?
Thank you

Use a command such as:
find ~ -flags uchg
to search your home folder. Replace the ~ with a / to search everywhere in the drive you have access to. The schg flag may also be set on a locked file.
(50693)

Similar Messages

  • Using Terminal to Find Locked Files

    Hello all,
    I am a photographer and often use the locking feature on my camera to lock certain images, ones that are good shots.  With Windows, I was able to sort by whether a file was locked or not.  However I am finding that Mavericks does not have this feature.  Therefore I have resorted to using terminal to find locked files.  However I was wondering if I could get assistance in creating a script/command that would take the results of the files I found locked and either copy or move them into a subfolder.
    IE: I have an event folder called BRB-Team1VsTeam2.  I use the command "find . -flags uchg" to find the locked files.  What I need to do now is get the returned result and either copy or move into a subfolder called "locked".
    I tried "find . -flags uchg && cp /locked" but I know the logic isn't quite there but I haven't played with terminal too much to know what I am doing.
    So anyone have a solution to this?  Or know of an application to at least let me search/filter/sort by the file status (IE: Locked vs unlocked)?

    Here is the basic idea, adjust as necessary. The -d option limits the depth into the folder you are searching. You don't need it; I just added if you want to limit the depth into subfolders.
    find /search/path -d 1 -flags uchg -exec cp {} /destination/path \;
    You could roll this up in an Automator workflow, Service, or Folder Action if you want:
    By checking the "Show this action when the workflow runs" you can choose the destination folder at run time. If always the same, leave it unchecked.
    A Folder Action would work on the items added to a particular folder. The find command would have to be modified.
    A Service could be used to pick the source folder, or to add a shortcut command.

  • How to find locked files and unlocked them???

    Having trouble for snxing itunes i need to find locked files but i dont know how and unlocked them so that i can sync again..

    When i connect my ipod into my computer "unknown error occured(-54)" is keep appearing thats why i cant see my library in my ipod.. And i think locked items caused this.. I open once another program that for browsing files to for iphones and ipods and after that the unknown error keep appearing and some of my musics are in grey i cant even delete it

  • How can I find locked files

    Is there a way to search for locked files on a Mac?

    Try the Hidden Files Widget for Dashboard. So you have on Dashboard a button to show or hide your files.
    Tested by me on Snow Leopard and Lion.
    http://www.apple.com/downloads/dashboard/developer/hiddenfiles.html

  • Mac Lock Files on Windows File Server.

    Hi Pro,
    got some problem with Mac based design studio who have some weird issues with files locking on a Windows Server 2008 R2 server. After investigation, it is 100% a file locking issue. Some programs including preview, acrobat, indesign, finder or opening files (assuming locking them) and not releasing. Killing all the programs or remounting the share is working (releasing all lock files) but it's only a workaround not a fix. Do you any hints ? or Solutions ? all 10.7.3 Mac, using SMB protocol on a windows 2008 R2 File server.
    Thanks to all !!!

    yeah try this ... sorry french blog .. try google translate:
    http://clickpom.com/blog/mac-finder-lock-files-on-windows-server-smb-shared/
    this fix the issue for my client

  • Search for Locked Files

    Is there anyway to search a folder for only locked files?
    Thanks
    Ro

    Unfortunately the option to search for files that are read only, which one would think meant locked files, simply doesn't work. The only method to find locked files I know of uses the Terminal. See this archived discussion:
    http://discussions.apple.com/thread.jspa?messageID=1167705&#1167705
    Hope the explanation is clear enough!
    Francine
    Francine
    Schwieder

  • How do i find locked music files to solve my -54 error for windows 8

    everytime my itunes starts up, it comes up with " the ipod could not be synced, an unknown error occured (-54)", i've read that people find the locked files in their library and unlock them and it solves the problem, but i wanted to know how i find the files for a windows 8 pc?

    Maybe:
    https://answers.yahoo.com/question/index?qid=20090723091425AAM63Zz

  • Lock files in Finder?

    Can you lock files in your Finder? I know you can lock the entire drive, but can you lock a specific one?
    This isn't in relation to locking ****, believe it or not :P

    Welcome to Discussions - select the file you want, Get Info on it and click the lock at the bottom of the window.

  • Finder locks up when attempting to access files on external drive

    HI all,
    I am experiencing a sinking feeling at the moment - I have been editing large amounts of video in a particular project and on recent captures I found I only had about 5gb left on my external Maxtor 300gb hard drive, which aborted the last capture, reporting "dropped frames" in final cut pro.
    History has shown this happens when the hard drive gets close to running out of space.
    I went to finder to delete some unneccessary files but when I try to, finder locks up and does not allow me to access any of the files. I believe this is also to do with the fact that the space is getting low, but how do I get into the files to delete them when finder won't let me do so?
    At the same time I am hoping this is not a hard drive failure in the making...
    Thanks
    David

    Ok - for a while there, the hard drive would not come up on the desktop - but now on a re-boot of the compter, or if I disconnect the hard drive and re-connect it, a message comes up with three buttons which say:
    Initialize
    Ignore
    Eject
    Sound like the hard drive has died?

  • Is there a way to find all the locked files my computer?

    I am having trouble importing some files into Aperture and I discovered that one of the reasons might be that some of the files are locked. I know how to unlock them but I'd like to find the locked files and unlock them all at once. Is there a way to do that?

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

  • HT2674 I have an iMac purchased in May 2011.  OSX Lion 10.7.3.  I deleted backup file from the external hard drive. Now, the trash can will not empty some of the files deleted.  File folder: "Core Services" contains a locked file: "boot.efi".  It will not

    I have an iMac purchased in May 2011.  OSX Lion 10.7.3.  I deleted backup file from the external hard drive which operates from Time Machine.
    Now, the trash can will not empty some of the files deleted from the backup harddrive.
    The trash contains-- File folder: "Core Services" which contains a locked file: "boot.efi". 
    It will not delete.
    How do I get the trash can empty of these files?

    Yes, the Old Master file has a folder for each year where I find all photos from that specific year. I am attaching a screen shot of the file.
    In the meantime i have managed to download all photos (it did not download any video files though in mpg, avi, 3gp, m4v,mp4 and mov format) to a new iphoto library. Unfortunately the photos are quite mixed and often doubled up. I ma considering to purchase iphoto library which checks all duplicates in iphoto. this will save me a lot of time. What do you think?

  • ORA-27086: unable to lock file over NFS -- but it's NOT Netapp!

    My 10.2 database crashed, and when it came back I got the following error:
    ORA-00202: control file: '/local/opt/oracle/product/10.2.0/dbs/lkFOOBAR'
    ORA-27086: unable to lock file - already in use
    Linux-x86_64 Error: 11: Resource temporarily unavailable
    This is a classic symptom of a Netapp problem, which likes to hold file locks open on NFS mounts. There is a standard procedure for clearing those locks; see, for instance, document 429912.1 on Metalink.
    Unfortunately, my files are mounted on an Isilon, one of Netapp's twisted cousins. I can find no references to "isilon" on Metalink, and we are at a loss how to resolve this.
    My sysadmin assures me that "there are no locks on the Isilon". But I know this cannot be the case, because if I do the following:
    1. delete the lockfile /local/opt/oracle/product/10.2.0/dbs/lkFOOBAR, and then
    2. move my controlfiles aside, and then copy them back into place,
    then the database will mount. However, it will not open, because now all the datafiles have locks.
    Is there anyone with experience in clearing NFS locks? I know this is more of a SA task than DBA, but I am sure my SA has overlooked something.
    Thanks

    New information:
    As stated above, I moved the controlfiles aside and then copied them back into place, like this:
    mv control01.ctl control01-bak.ctl
    cp control01-bak.ctl control01.ctlDid that for each controlfile, and then the database mounted.
    But, after rebooting the machine, we discovered that all locks were back in place-- it looks like the system is locking the files on boot-up, and not letting them go. The lock is held by PID 1, which is init.
    sculkget: lock held by PID: 1This is definitely looking like a major system issue, and not a DBA issue, and hence I have little right to expect assistance in this forum. But nonetheless I lay my situation out here before you all in case someone else recognizes my problem before the server bursts into flames!
    The system is CentOS 4.5-- not my choice, but that's the way it is.

  • Locked file on desk top

    Hi,
    I had a locked file in the trash and thought i'd drag it out to the desk top and delete the other stuff in there. Well it duplicated itself and I cant get rid of it (BBEdit html file)
    command i and unlock the little lock doesn't help.
    Used option empty to finally empty the trash. Help says I should try this little operation:
    1. Start in single-user mode; for instructions see Mac OS X: How to Start up in Single-User or Verbose Mode.
    2. Type this, followed by Return: mount -uw /
    3. Type this, followed by Return:
    cd /Library/Preferences/SystemConfiguration
    4. Type this, on a single line, followed by Return:
    defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true
    5. Type this, followed by Return: sh /etc/rc
    6. Wait for the on screen text to stop scrolling and then press Return
    7. Type this, followed by Return:
    find / -flags schg -exec chflags noschg {} \;
    8. Once this is finished, type this followed by Return:
    rm /Library/Preferences/SystemConfiguration/autodiskmount.plist
    9. Type this followed by Return: reboot
    I find this to be a tad on the cute side. Beside needing to type that much with no errors, how do people remember it?
    Is there a place to store things so you can find them in single user mode?
    Thanks,
    Garrett

    drag the file to the desktop. Open the Terminal app. Type the following:
    sudo rm
    Make sure there's a space after the rm Then drag the file in question to the Terminal window. Hit Enter. Insert your admin password at the prompt and the file is gone.

  • I recently thought I was updating my Safari browser. When completed, I put all those little files that were on the desktop into the trash. Now my trash is saying it can't be emptied because there are locked files and I don't know how to unlock them

    I recently thought I was updating my Safari browser. When completed, I put all those little files that were on the desktop into the trash. Now my trash is saying it can't be emptied because there are locked files and I don't know how to unlock them or get them out of my trash and they keep multiplying. And to make matters worse, I tried renaming them as pdf files thinking that might do the trick.

    oh boy ! I'd ask you if you knew what kind of files they were or where they came from, but I don't think you could help me a bunch. Try going to the Utilities folder and running Disk Utilities.  If you want to empty the Trash and it won't empty, go to the finder and choose "secure Empty trash". Worse case scenario-you may have to reinstall Snow Leopard, but I don't know what else to suggest. If you have a DVD of Snow Leopard, boot up from that,  and reinstall the OS. This will not touch the stuff you have on your Hard Drive, then you can update from 10.6 to 10.6.8, otherwise Onyx? Maybe those files are part of the OS which needs them to keep running.  if you hold down the Shift key on reboot, you can reboot in Safe mode and maybe you can take the files out of the trash that way
    good luck
    John B

  • Acrobat 9.5.5 unable to find resource files

    I am using Windows Vista und with the upgrade to Adobe Acrobat 9.5.5, I lost the administrative privileges on my own computer and Acrobat is unable to find resource files. I reinstalled Acrobat 9.5.5, went through the repair option, but have been unsuccessful in converting Windows files to PDF. Any suggestions? do I need professional help?

    It is most likely looking for the job settings files. It may be that they are locked for some reason. I would look for those files and then be sure the folder is not restricted. I might be able to find the location based on my AA8 installation on VISTA at work, but that may be a while off. Seems strange that the update would do this change. The AA9 update that I did on Win7 had no such problems.

Maybe you are looking for

  • Asset Reverse

    Dear All Experts, I want to reverse my Posted Asset Document. I am trying to reverse with Tcode AIST, After giving all inputs and executing it , givens error message , "Line item settlement is not possible for asset RI01 9900047 0 , Message No. Aw050

  • Wifi networkconnection fails

    Hi there! I don't know why, but my ArchLinux system fails everytime I try to connect to any wlan access points. Neither my smartphone's wlan hotspot is working nor my home network. I even tried wicd, netcfg and wicd and NetworkManager even without pr

  • Email Messages Replacing Letters With = Signs

    Somebody please help I am having an issue with my z10. When I send an email from my device is adds a bunch of script into the email that should not be there. It even goes as far as replacing letters I have put in with = signs and a bunch of other ran

  • Invalid Key Exception: Unsupported key type: Sun RSA public key, 1024 bits

    I am trying to retrieve certificates from Microsoft Keystore and extract its keys using SunMSCAPI in jdk 1.6. It gives me an invalid key exception, when I am trying to wrap the Symmetric key (which was previously used to perform AES encryption on dat

  • Script to Deal with Organizing Music

    Hello all, So I've been wanting to organize my music collection for a while, and I wanted to also fix errors with tags. Instead of spending an hour to do it by hand, and have things degenerate again over time, I wanted to create a script that would d