Help needed about deleting files.

Anyone could tell me what Java sentence can I use to delete a file from a UNIX filesystem. What class does provide this method?

Hi,
The File class has got method to delete a file from file system.
File objFile = new File("<the complete path of the file>");
if(objFile.exists()) { objFile.delete(); }
Only extra thing with unix will be permission to delete
the file. If the user who is logged into the system with
permission to delete the file then only the java
program which is run under that user id will be able
to delete the file. Otherwise change the mode of that
directory to '777'.
chmod 777 /home/temp

Similar Messages

  • Help needed on deleting files out of the library when syncs

    hi i uploaded a few video files of my wedding to my ipad by adding a file to library. As there are a few vidoes i uploaded i now want to delete them, how can i do this. I cant find anyway of taking them out of the library when the ipad syncs. I have unticked them in th elibrary but cannot find a delete button or option to get rid of them. I want to add disney fims into there now fromt he store.

    hi i uploaded a few video files of my wedding to my ipad by adding a file to library. As there are a few vidoes i uploaded i now want to delete them, how can i do this. I cant find anyway of taking them out of the library when the ipad syncs. I have unticked them in th elibrary but cannot find a delete button or option to get rid of them. I want to add disney fims into there now fromt he store.

  • Help needed with deleted files

    Hi all
    Still a novice, though have been using Aperture successfully for a few weeks now...
    I have somehow (and I am still trying to go back and work out how) managed to delete a whole named project with all the photos in it.
    I went from one project to another, in order to continue editing, but when I used the control back arrow and delete button to delete 1 photo that was highlighted, it deleted all the photos and the project (or so it seems).
    Where can it be, is it lost for ever, and if it isn't how can I retrieve it?
    Thanks
    Ruth

    Any other ideas? Still can't find them.....reading the manual to see if that gives me any more clues too!
    Despairing now!!
    Please help!

  • Java Web Start help needed about writing files?

    Hi there! I have this java web start app. i have implemented the File Open service succesfully using the JNLP API but i cant seem to get the File Save Service to work. Basically I have an object in the system which I want it to be serialised to a file on the user's desktop.
           FileSaveService fss;
             try {
                 fss = (FileSaveService)ServiceManager.lookup
                                       ("javax.jnlp.FileSaveService");
             } catch (UnavailableServiceException e) {
                fss = null;
            if (fss != null) {
                try {
                FileContents fc = null;
                FileContents newfc = fss.saveFileDialog(null, null,
                fc.getInputStream(), "newFileName.txt");
                FileIO io = new FileIO();
                io.write("new123.nod", r.getTree());  /// my object is r.getTree() !!!
                } catch (Exception e) {
                      e.printStackTrace();
            }My Object (r.getTree) is basically an array. But I cant save it because the saveFileDialog method accepts ObjectInputStream as a parameter?! Any ideas? Thanks!
    Edited by: player123 on Jun 11, 2009 8:56 AM

    does anyone know? It actually doesnt even open the Save dialog?? why is that?

  • Hi, WWhen I turn on my mac pc, enter my account password my page wont load up , I can access the internet through my families account but not mine. There is a message telling me I need to delete files but the page won't load anything. Any help appreciated

    Hi
    When I turn on my pc and log into my account there is a message telling me I need to delete files. But the page won't load up anything to allow mw to do this. I am concerned I may have lost all my personal info.
    I can log into other family members accounts but not mine.
    Any help appreciated
    Thanks

    You only have to clone your mac when using certain cable modem.  You don't clone your mac when using dsl.
    Greetings from Northern Ontario, Canada

  • I got a message saying that my startup disk is full and I need to delete files.   What files and where can I find them?

    I got a message saying that my startup disk is full and I need to delete files.  I don't know where to fined the files I need to delete and don't understand how my disk can be full.  Can someone help me with this?

    To see how much disk space is available ...
    Click your Apple menu  top left in your screen. From the drop down menu click About This Mac > More Info > Storage
    Make sure there's at least 15% free disk space.
    Photos, video, documents, etc. all require disk space.
    OSX Tips Where did my Disk Space go?
    5 Quick Tips to Free Up Disk Space in Mac OS X
    Freeing Up Hard Disk Space - Mac Guides
    Never remove any Apple pre installed apps or system files.

  • I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?

    I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?
    Thanks!
    David

    Either of these should help.
    http://grandperspectiv.sourceforge.net/
    http://www.whatsizemac.com/
    Or search 'disk size' in the App Store.
    Be carefull with what you delete & have a backup BEFORE you start, you may also want to reboot to try to free any memory that may have been written to disk.

  • Keep getting a popup window stating" startup disc almost full, need to delete files"

    keep getting a popup window stating" startup disc almost full, need to delete files", what can i do to help with this, i generally have only photos in iphoto, some imovies, and a small amount of documents

    You should never, EVER let a conputer hard drive get completely full, EVER!
    With Macs and OS X, you shouldn't let the hard drive get below 15 GBs or less of free data space.
    If it does, it's time for some hard drive housecleaning.
    Follow some of my tips for cleaning out, deleting and archiving data from your Mac's internal hard drive.
    Have you emptied your iMac's Trash icon in the Dock?
    If you use iPhoto, iPhoto has its own trash that needs to be emptied, also.
    If you store images in other locations other than iPhoto, then you will have to weed through these to determine what to archive and what to delete.
    If you use Apple Mail app, Apple Mail also has its own trash area that needs to be emptied, too!
    Delete any old or no longer needed emails and/or archive to disc, flash drives or external hard drive, older emails you want to save.
    Look through your other Mailboxes and other Mail categories to see If there is other mail you can archive and/or delete.
    Other things you can do to gain space.
    Once you have around 15 GBs regained, do a search, download and install OmniDisk Sweeper.
    This app will help you locate files that you can move/archive and/or delete from your system.
    STAY AWAY FROM DELETING ANY FILES FROM OS X SYSTEM FOLDER!
    Look through your Documents folder and delete any type of old useless type files like "Read Me" type files.
    Again, archive to disc, flash drives, ext. hard drives or delete any old documents you no longer use or immediately need.
    Look in your Applications folder, if you have applications you haven't used in a long time, if the app doesn't have a dedicated uninstaller, then you can simply drag it into the OS X Trash icon. IF the application has an uninstaller app, then use it to completely delete the app from your Mac.
    Download an app called OnyX for your version of OS X.
    When you install and launch it, let it do its initial automatic tests, then go to the cleaning and maintenance tabs and run the maintenance tabs that let OnyX clean out all web browser cache files, web browser histories, system cache files, delete old error log files.
    Typically, iTunes and iPhoto libraries are the biggest users of HD space.
    move these files/data off of your internal drive to the external hard drive and deleted off of the internal hard drive.
    If you have any other large folders of personal data or projects, these should be archived or moved, also, to the optical discs, flash drives or external hard drive and then either archived to disc and/or deleted off your internal hard drive.
    Good Luck!

  • I want to ask about deleting files that have been deleted in the trash but I want to remove it permanently from the trash can not

    I want to ask about deleting files that have been deleted in the trash but I want to remove it permanently from the trash can not, indeed I delete files that are partly contained in the application file. I want to delete files that are also quite a lot by 5 Gyga, I've tried to remove it from the normal trash remains are not removed. How should I do?

    +

  • What directory/area is needed to delete files when your startup disk is warning it's getting full?

    Have the message that the startup disk is near full and I need to delete files.  What area or directory will directly clear this issue.  I have cleared out trash and deleted files....is there a specific directory that causes this issue.  thanks much

    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • When I turn on MacBook Pro it telling me that my start up disk is full and I need to delete files.  How do I get to start up disc?

    When I search a file called start up disc, nothing shows up. How do I delete files so when my computer starts up, I no longer get a message stating that my start up disc is full and that I need to delete some files?

    There is a boot drive inside the computer and it's storage space is filled up.
    You need to create a external storage drive and transfer some of your files off the internal boot drive.
    TimeMachine doesn't work for this as it's just a rotating backup image of what's on your boot drive, it's not a storage drive for more space and to save things permanently.
    So what you need to do is get three external drives from the office or computer store.
    I suggest 3-4 separate drives at 1TB each (or more capacity if you really got a lot of stuff), USB 2 is currently fine, the newer USB 3's are more expensive but your Mac doesn't have USB 3 ports, so get the less expensive USB 2 drives and save some money. If you can get Firewire 800/USB combination drives, those would be a better choice as Firewire 800 is the fastest for most Mac's. Only the very new ones have Thunderbolt and the new drives for that are rare and expensive.
    Make sure they are self powered drives with their own power supply, not port powered as those are a bit flaky as Apple can just determine the device is drawing too much current from the computer and turn it off.
    Note: sometimes if your computer is so full, you might actually have to delete some files in order to be able to get it to function transferring files, so pick ones that you can get new copies again, like free iTunes podcasts or movies for instance.
    TimeMachine Drive
    The first drive you connect to the Mac is going to pop up a window to ask if you want to make this a "TimeMachine Drive" go ahead and allow it to do that, it's backing up everything on your internal boot drive, it's going to take a long time.
    Once it's finished, disconnect this TimeMachine drive and label it as a "TimeMachine Drive"
    Extra space /Storage drives
    The second drive you connect is going to be your "extra storage drive" basically to free up space off the internal boot drive by transferring files to it.
    Formatting:
    You first need to format this drive, you use Disk Utility in the Applications> Utilities folder.
    On the left will be the 'name of the drive' + "media" click that and then click the Partition tab
    Now click 1 Partition, Option: GUID, format OS X Extended (Journaled), give it a name like "StorageOne" and click Apply.
    Now click the Erase Tab and Security Option> Zero All Data and click Erase (use the same name) this will take a long time, like 2 hours per 1TB. It's going to check the drive for any errors and make sure it's working.
    Note: If the drive fails to format, then perform the Zero All Data first, then visit the Partition tab.
    Once the second drive is finished, then do the third drive in the same manner, this time naming it "StorageTwo"
    Transferring Data off to the Extra Storage drive
    Connect only StorageOne drive and visit your User/Movies folder, it's likely the biggest culprit of oversized files. Create a new folder on the StorageOne drive called "ExtraMovies" and transfer the contents of User/Movies to the "ExtraMovies" folder via drag and drop methods.
    Confirm the files were transferred and then delete those movies by dragging them to your Trash can and selecting "Empty Trash" from the Finder menu (if you select Secure Empty Trash on large files it takes a really long time to finish as it's scrubbing the drive, likely unnecessary except for sensitive files)
    If you have a large amount of User/Files elsewhere, you will have to search yourself and repeat the same steps to free up room on your internal boot drive.
    Once you have made some free space, download this free program to help you visualize where all your space is being taken up.
    http://grandperspectiv.sourceforge.net/#download
    Once you have completed moving files to the StorageOne drive, connect StorageTwo and copy the contents of StorageOne folders to StorageTwo drive. Both drives have to be connected of course.
    Rule of thumb
    Maintain TWO separate hardware copies of your User data at ALL TIMES
    Because you need more room, thus the storage drives are for extra space. The TimeMachine drive is a backup of your internal boot drive and the second storage drive is a backup copy of the first storage drive. So that way your sticking with the rule of thumb, get it?
    Don't connect TimeMachine while your transferring files, or formatting drives, you don't want it to "kick in" while your doing all this heavy work or transferring a large amount of files, I think it does so every hour, which you are going to taking quite some time to do all this work.
    Once your all done making room and copying files to the Storage drives, disconnect them and label them and date them.
    Reconnect TimeMachine drive
    Then connect the TimeMachine drive and it will make a NEW backup of your now newer configuration on your boot drive and keep it updated every time you connect it.
    Again, TimeMachine is NOT a storage drive for permanent keeping of data, it deletes old stuff as time progresses. So even though you can "go back in time" and recover a file you transferred then deleted off the your internal boot drive, it  won't keep everything forever like a storage drive can.
    Consider Cloning your boot drive.
    TimeMachine drives can only restore, they are not bootable like a clone is, so a TimeMachine drive isn't a heck of a lot of help if your hard drive fails to boot the computer, so a "hold the option key bootable clone" made with third party software is a very useful as you get to use the computer just like it was before and can get online, grab files off the internal drive and so forth. Even erase and reverse cloning!
    The trick with a clone is you make one and keep it disconnected, updating it from time to time. If a software update or install hoses your machine, you can option boot off the clone, grab the latest copy of your files and reverse clone the clone with the updated files back onto your OS X partition, reboot the computer and it's like nothing happened.
    It's a advanced technique, you will have to learn a lot more perhaps before attempting it, but it's a lifesaver.
    Cloning requires another separate external hard drive and free cloning software.
    You can read more about it all here. Take your time, you have a lot to absorb.
    https://discussions.apple.com/message/16276201#16276201

  • STARTUP DISK FULL NEED TO DELETE FILES IN OTHER

    I know vertually nothing about this computer. Am on the road with it and use it for business in my truck. I keep getting a message that says that the startup disk is almost full and it won't allow me to use it until I remove some files. Somehow, was able to bring up storage bar that shows that the "other" which is expressed in yellow, contains the vast majority of my usage or files and what is in there is beyond me. This has all started since I got the iPhone 5 and had to replace it and redownload all in my truck using my verison wifi. Please help you can. Thank you!

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of your data. I've seen no evidence that there is any advantage to having more available space at any given time than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    If you're using Time Machine to back up a portable Mac, some of the available space will be used to make local snapshots, which are backup copies of files you've recently deleted. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as "Backups." The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself.
    About local snapshots
    Use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Proceed further only if the problem hasn't been solved.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the 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 (command-V) into the Terminal window. You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means.
    When you're done with ODS, quit it and also quit Terminal.

  • Help needed ASAP -- Project file won't open

    Stuck in Africa right now (can't call telephone support).
    I am volunteering on a medical/dental trip and am in charge of the final nights video.
    Here is the problem.
    I am almost done with the video (15 minutes long -- full HD) and suddenly the when I click on the project from the project library it won't open.
    all the other projects open fine. Just this one project won't.
    when I click on it, the project library slides to the side, but behind it is another project library, but when I mouse over it plays the movie, but it is un-editable in this state.
    It was working great until this dreadful moment....
    I saw another post about deleting the thumbnails for an EVENT that was having problems. Can this be done with a PROJECT file?
    The big movie presentation/trip is in 12 hours....
    Can anyone help me???

    One time, after quitting IM and re-launching it later, my project disappeared from the project list.
    Apple Support told me to do this.
    1) quit IM
    2) with the finder, move the project out of the project directory
    3) launch IM
    4) quit IM
    5) with the finder, put the project back into the project directory
    6) launch IM
    My project re-appeared. He said these steps forces a project index to be rebuilt.
    Your symptoms are different but maybe the cure is the same --- good luck.

  • Help Needed re joining files

    I need some basic conceptual help with QT! I have used QT Player since QT started, but I have always used it just to play whatever simply double-clicks open in it. I have QT Pro, so I know QT can do more. However, I don’t understand some basic things about QT:
    1. On the File Menu, what is the difference between “open” and “import,” and why would one choose one or the other?
    2. What is the difference between “save as” and “export,“ and why would one use one or the other?
    3. My QT v. 6.03 (running on OS 8.6/9.1) regularly uses four different (at least) file types with the creator code TVOD:
    MooV - created when a file is “saved” or “saved as” from QT
    MPEG - files downloaded by the browser to the hard drive have this file type.
    MMCH - in the MSIE temporary folder when MSIE uses the QT plug-in to run an abc123.mpg or an abc123.mov file.
    mpg4 - created when a file is “exported” from QT (I assume there once was/is mpg1, mpg2, and mpg3?)
    What is one supposed basically to know about these file types and when to use which.
    4. I would like to be able to join two downloaded mpg files together to make one. The mpg files consist of a video travelogue with an oral narrative. However...
    The files download with a file type of MPEG and named A1.mpg and A2.mpg. When I open these in QT, the Edit Menu is dimmed and unavailable. I can play each file individually and the files display fine with the sound inteact.
    If I re-save these using “SaveAs” I get MooV files, which will open and play, but again, the EditMenu is dimmed and unavailable. I can play each file individually and the files display fine with the sound inteact.
    If I “export” these two files, I get mpg4 files which will open and play the video only -- no sound, BUT, the EditMenu IS available and undimmed and I can copy and paste the two files into one file, which will play the video in order; however, the sound is lost...
    ...and so am I! Help!

    One would "Open" a regular QT formatted file (.mov, .mpg, .avi). You would "Import" (Pro only) a non QT formatted file (.jpg, .mp3, .txt) to use them in QT content. Version 7 does away with the "Import" menu as the Open menu really does the same as Import.
    "Save As" does not re-compress the data in the file. You don't want to re-compress a simple "Cut" for example. Save As creates a new file and leaves the original untouched. It also puts the file (whatever formats) into a .mov "container".
    So you could "Import" a Flash file (.swf) and "Save As" a .mov file. No compression. No conversion. Just a Flash track in a .mov file.
    "Export" is used to "convert" the file to other formats (Movie to iPod Movie).
    There never was any MPEG-3 format (beyond specs) and we are now using MPEG-4. An .mp3 file is really MPEG-1 layer 3 (another spec).
    Basic rule: QuickTime can "play" MPEG-1 and MPEG-2 (additional software required) but can not edit the formats.
    Do a search for (very old) software that can "demux" (separate audio and video) from your MPEG-1 files. Most are free and can convert the files to formats you can edit with QT Pro.
    Your version 6 "Key" is still valid if you ever decided to move up to OS X. It will be of little value in Tiger because it requires QT version 7.

  • My startup disc was full. I need to delete files. But my laptop won't open any applications.

    I had widow popping up saying I need to delete some files as my startup disc was full. So I connected External HD and wanted to empty dome of the 40000 photos I have on iPhoto. But my laptop stated to sync automatically to Lacie, and after sometime my laptop kept crashing or switching off. I manage to log in to my desktop but I cannot run a single application except finder

    How much free space do you actually have? Go to the Apple menu and select About This Mac... More Info... and click on the Storage tab. You should see something like this...
    This will show you how much free space you have and what's taking up all the space on your hard drive. You may need to backup and trash some seldom used files, applications, etc. You have to drag them into the Trash and empty the trash to regain the space. A general rule of thumb is that you should have about 15% of your hard drive storage free.
    Good luck,
    Clinton

Maybe you are looking for

  • Error while compiling DFF

    Hi, I have added a segment to the DFF, 'Group, Team and Roles Additional Information' and associated a Custom Dependent valueset to that. While i compile the flexfield, I am getting the below error. +APP-FND-00798: Invalid reference $PARENT_VALUE$ in

  • Hit by the famous "Failure to start JBOSS Service During Conf Management.  Error[ALC-LCM-999-032]"

    Hi Everyone, I m really frustrated with this issue. I am trying to install Adobe LiveCycle ES Update 1 trial version JBOSS turnkey option. It does not work!! The installation goes smoothly. But when I launch the config manager, there is no way I get

  • Dynamic list to generate url variable

    Hello, I am using a dynamic list to pull product codes from a database. I then want to pass the code into a url variable when it goes to the results page. This is so customers can chose which code they want to go to a detail page about. I already hav

  • I uninstalled FaceTime 1.1 in Lion, how do i get it back?

    Had the server problem so figured if I uninstalled it then reinstalled via Mac App Store then it might work...I was wrong and now I can't get 1.0.2 to work and can't get 1.1! Help me please, would be much appreciated.

  • /lib32 folder required for Oracle 11g on Linux 32 bit

    Hi, I have 64 bit linux and Oracle 11g installed but one of my applications is using 32-bit libraries. So i am thinking of copying the lib32 folder in ORACLE_HOME and paste the path in LD_LIBRARY_PATH. Will it work or not???? If YES, i need the lib32