Lost file with rm command

Hello all,
I don't know what I wanted to do with this command but I did it ^^
# rm YYYYY.data Whitecastle
rm: cannot remove `Whitecastle': No such file or directory
After this clever action I can't see the YYYYY.data file in the folder, is it still on my HDD or gone forever?
Thanks in advance.
Last edited by Namik Delilovic (2009-05-12 16:07:46)

Namik Delilovic wrote:
"when you use rm from the terminal, it immediately "deletes" the file bypassing any use of a trashcan. Fortunately, most filesystems wont actually REMOVE the data, but merely mark its location on your harddrive as "usable" by other file writes.  Because of this, you may still be able to recover the item."
Nice to know that, i never thought about it
Thanks
sure thing!  I believe you can modify your ~/.bashrc to change the behavior of rm to reflect a trash can...I'm not sure if this works in Arch as I havent tried it here - but it *SHOULD* of course.
make a trash directory first:
cd ~/
mkdir .Trash
~/.bashrc:
alias rm="mv ~/.Trash"
If you now rm a file or directory as the user with the new .bashrc, it should go to trash.  log out and back in or reboot first though.  additionally, rm now behaves like mv - keep this in mind!  If for example, ~/.Trash contains a file named "foobar" and you delete "foobar" from somewhere else on your system...mv now overwrites (replaces) the foobar that was already in the trash with the foobar you just moved.  obviously, the above solution isnt perfect, but its a quick and dirty way to save your butt from time to time.
If you hunt around I'm sure you could find a script to more intelligently handle deletions and put an alias in for rm to call that from /usr/bin or something.
you can also edit ~/.bashrc to contain
alias rm = 'rm -i'
which will interactively ask for confirmation...personally - this is a PITA if you ask me - but many people like it. additionally, i just got in the habit to confirm anything and then in the case that I did type the wrong thing, i confirmed it anyway. a bit of windows dialog syndrome, if you will... haha
handling your deletion all comes down to how careful you can be...hopefully one of the above suggestions helps save you further turmoil down the line
Last edited by thisperishedmin (2009-05-13 11:48:37)

Similar Messages

  • Adobe Reader XI does not open files with a command line "path" argument.

    Adobe Reader XI does not open files with a command line "path" argument. Version X and lower all worked fine. I have deleted and reinstalled the program with no success. Is this a bug?

    Hi Daniel,
    What is the make of the printer and is it using PCL or PS driver.?
    Do you have Acrobat installed on this machine as well?
    Please check if 'Print Spooler' service is running on the machine.
    Regards,
    Rave

  • How to use "choose file with prompt" command?

    I need to use "choose file with prompt" command and I want give user possibility choose ONLY images (jpeg, png, gif). So, I write like this:
    choose file with prompt "Please, choose images for processing..." of type {"JPEG Image"}
    But this doesn't work! - All files (including jpegs) are dimmed, and user can't choose any....
    So, how can I filter JPEGs, PNGs and GIFs?

    I have found, that most of images on my computer has missing file_type, I don't know why..... so "type identifier of (info for (choose file))" also doesn't work properly.
    The only one way that 100% works is use Uniform Type Identifier (UTI) -- details here: http://www.huw.id.au/code/fileTypeIDs.html
    thanks.
    iMac G3, PowerBook G3 FW   Mac OS X (10.4.5)  

  • Accidentally deleted oracle 10g  file with rm command

    Hi all,
    please help me, i have accidentally deleted file with rm command yesterday now below error is given
    ORA-01110: data file 64: '/u01/app/oracle/product/10g/dbs/test
    ORA-27041: unable to open file /u01/app/oracle/product/10g/dbs/test
    SVR4 Error: 2: No such file or directory
    /u01/app/oracle/product/10g/dbs
    database is still open and below is the information of deleted datafile:
    select * from dba_data_files where file_id=64
    FILE_NAME     FILE_ID     TABLESPACE_NAME     BYTES     BLOCKS     STATUS     RELATIVE_FNO     AUTOEXTENSIBLE     MAXBYTES     MAXBLOCKS     INCREMENT_BY     USER_BYTES     USER_BLOCKS     ONLINE_STATUS
    /u01/app/oracle/product/10g/dbs/test     64     test     67,645,734,912     4,128,768     AVAILABLE     64     YES     68,719,443,968     4,194,302     1     67,645,538,304     4,128,756     ONLINE

    user3240461 wrote:
    Hi all,
    please help me, i have accidentally deleted file with rm command yesterday now below error is given
    ORA-01110: data file 64: '/u01/app/oracle/product/10g/dbs/test
    ORA-27041: unable to open file /u01/app/oracle/product/10g/dbs/test
    SVR4 Error: 2: No such file or directory
    /u01/app/oracle/product/10g/dbs
    database is still open and below is the information of deleted datafile:
    select * from dba_data_files where file_id=64
    FILE_NAME     FILE_ID     TABLESPACE_NAME     BYTES     BLOCKS     STATUS     RELATIVE_FNO     AUTOEXTENSIBLE     MAXBYTES     MAXBLOCKS     INCREMENT_BY     USER_BYTES     USER_BLOCKS     ONLINE_STATUS
    /u01/app/oracle/product/10g/dbs/test     64     test     67,645,734,912     4,128,768     AVAILABLE     64     YES     68,719,443,968     4,194,302     1     67,645,538,304     4,128,756     ONLINEhttp://www.lmgtfy.com/?q=oracle+open+DB+missing+file

  • I cannot get trace file with sql command

    Hi,
               When I am executing the below command in SQLPLUS I could not find trace files in /oracle/(sid)/sap trace/ user trace directory. The command is
    >alter database backup control file to trace;
    I have executed this command with (sid)adm and ora(sid) .
    Our oracle version is 9.2.0.
    Please help on this
    Regards
    Nani

    Hi
             The file under /oracle/SDB/saptrace/usertrace showing below error
    pg sdb_ora_24618.trc
    /oracle/SDB/saptrace/usertrace/sdb_ora_24618.trc
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.7.0 - Production
    ORACLE_HOME = /oracle/SDB/920_64
    System name:    HP-UX
    Node name:      sandbox
    Release:        B.11.23
    Version:        U
    Machine:        ia64
    Instance name: SDB
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 0
    24618
    Ioctl ASYNC_CONFIG error, errno = 1
    Regards
    Nani

  • Delete IFS file with sql command

    Hi
    Is it possible to remove a file from IFS using an sql command? If so, what is it?
    Thanks
    Hugo

    No, this is not possible, nor is it supported. You may use the Java API to delete a file.

  • Open *.ste file with a command line

    Hello,
    Is there a way to import by a command line like :
    quote:
    dreamweaver -open mysite.ste
    I have a liste of *ste, and whant to run a script that
    automaticly import and open the site in DW. Can we do that or there
    is a solution to avoid to be inside the site panel to import an ste
    Thanks...
    Maelvon

    If you ever find this answer, it would be extremely useful to me right now.

  • Create biar file with command line for link universe

    Hi
    I am using boxi 3.1 and I am trying to create 2 biar files with the command line
    One file for " main" universe and it's reports and another is for a link universe and it's reports
    The problem that on "main " biar file that been created , the link universe and it's reports also appear in it.  Even so in the queries only the relevant objects are selected
    I try to remove from the properties file the parameter 'exportDependencies=true ', and then when I check the xml of the biar I so that the link universe and it's report no longer appear. But when I importing the file I receive the error message 'Required dependencies not found on target system : '[ARgp0DCiBRBOsL3EHYQaHBY, AdfkNagAE59Nsbazh40nwTU]'
    Does anyone have an idea what I need to do , in order to see in the main biar bust the main objects?

    I have done it before on BOXI R2 with the IW, and it works fine
    But any how, this is the way that we have to work with, since it is part of a customer product and the link universe and it's reports  is an additional part of the product.
    So is there a way that I can pull just the main universe and it's reports?

  • How to create file with APDU

    Hello everybody,
    It's my first time using Java Card ^_^,I want to create a file and fill the fill with binary data.but i don't know how to create file with APDU commands,so I need help here.
    I think that there must be a Manual of the JavaCard's OS in this world,can someone tell me where to download it??
    Thanks.
    the fllowing is my card:
    Samsung S1
    Model:TiEx-32J
    EEPROM size:32k
    Platform Version:OP 2.0.1
    Card Manager Status:OP_READY
    KMC:40~4F/No derivation
    Message was edited by:
    AllenHuang

    If you look around the forum for a bit, you will see that there is no notion of file systems on JavaCards (lexdabear posted this information less than two hours ago :-)). To store files, you will have to write an applet to hold byte arrays of the required size and handle receiving and sending of these.
    As for documentation, you should have a look at the GP (General Platform) specification at http://www.globalplatform.org/, which defines communication between smart cards and other devices, as well as Sun's own JavaCard pages (http://java.sun.com/products/javacard/), which contain several useful resources on JavaCards.
    Message was edited by:
    Lillesand

  • My old computer crashed and deleted my iTunes media file with all my playlist. However, my iPod has the playlist I lost on the computer. How can I replace (reverse synch?) my iPod media information back onto my (now reinstalled) virgin iTunes media folder

    My old computer crashed and deleted my iTunes media file with all my playlist.However, my iPod has the playlist I lost on the computer. How can I replace (reverse synch?) my iPod media information back onto my (now reinstalled) virgin iTunes media folder?

    Yes it's possible to sync music back from a iPod back into iTunes that (I assume) wasn't purchased on the iTunes Store.
    Apple allows iTunes Store purchases on devices to be reversed back into iTunes, just not cd rips and stuff like that. For that it's a one way trip to the device from iTunes.
    I likely can't suggest such software here, but if you visit iLounge you can ask what is the latest software that works for your platform.
    Really it only takes a mere few minutes to backup your iTunes Library and stick in a few cd/dvd's or a external drive. iTunes even has a menu command for it to make it oh so simple. Please use it and backup all your data.
    Hard drives fail, computers burn up, thieves steal, stuff gets forgotten. Plan for something happening because it will.
    Good Luck

  • Not able to extract performance data from .ETL file using xperf commands. getting error "Events were lost in this trace. Data may be unreliable ..."

    Not able to extract  performance data from .ETL file using xperf commands.
    Xperf Commands:
    xperf –i C:\TempFolder\Test.etl -o C:\TempFolder\BootData.csv  –a process
    Getting following error after executing above command:
    "33288636 Events were lost
    in this trace. 
    Data may be unreliable
    This is usually caused
    by insufficient disk bandwidth for ETW lo
    gging.
    Please try increasing the minimum
    and maximum number of buffers
    and/or
                    the buffer size. 
    Doubling these values would be a good first at
    tempt.
    Please note, though, that
    this action increases the amount of me
    mory
                    reserved
    for ETW buffers, increasing memory pressure on your sce
    nario.
    See "xperf -help start"
    for the associated command line options."
    I changed page size file but its does not work for me.
    Any one have idea, how to solve this problem and extract ETL file data.

    I want to mention one point here. I have total 4 machines out of these 3 machines above
    commands working properly. Only one machine has this problem.<o:p></o:p>
    Hi,
    I consider that you can try to use xperf to collect the trace etl file and see if it can be extracted on this computer:
    Refer to following articles:
    start
    http://msdn.microsoft.com/en-us/library/windows/hardware/hh162977.aspx
    Using Xperf to take a Trace (updated)
    http://blogs.msdn.com/b/pigscanfly/archive/2008/02/16/using-xperf-to-take-a-trace.aspx
    Kate Li
    TechNet Community Support

  • How to open a pdf file with command in WebBrowser control?

    Installed acrobat 6 or7 in my PC, then I load a WebBrowser control in IE to open a local pdf file with command line, such as "Page=3", and then open the same pdf file with WebBrowser control in other IE process, I found the command will affect other open and show operations in webbrowser. is it normal?  That is to say, When i set command "Page=3", the second time WebBrowser still open pdf with command "Page=3",I think it is bad.

    Hello:
    Thanks for your reply. I installed Acrobat6.0 or 7.0 in my PC, then i load a WebBrowser Control in IE by Html, then open local pdf with different command by running IE. We can get the command in this website: http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
    First:open local pdf with command : oWebBrowser.Navigate("G:
    PDF
    07000001.pdf#Page=3&Pagemode=thumbs", null, null, null, null);
    Second:Open the same local pdf with no command:  oWebBrowser.Navigate("G:
    PDF
    07000001.pdf", null, null, null, null)
    【Result】The first command "#Page=3&Pagemode=thumbs" will effect the way of showing pdf when second open. But, the phenomenon will not appear in Acrobat 8.0, 9.0, 10.0.

  • HT4718 I have nothing on my Mcintosh HD after trying to install Mavericks. I did save a recovery copy of files however this was also lost. All I now have is a file with a question mark with nothing else happening. What should I do?

    Apple recently sent a message asking me if I would like to upgrade to Mavericks which was free. I considered installing after saving a copy of my HD to a WD external drive. I proceeded with the instalation however when it was time to reboot the programme the computer displayed a message that it could not process the request due to errors with the hard drive. The computer then requested that i save a copy and the verify disk and repair disk which i followed and the computer would not repair due to an error. At which pioint I did some research and was told by the IMac to push shift when it starts to enter disk utility and repair the Mcintosh HD. I did as asked however the computer would still not install with Mavericks.
    So after many attempts of trying to start over, I was prompted to erase the Mcintosh HD and reboot using the saved copy. At this point all data was lost and all that is left on my computer is a file with a question mark with no way of restoring the HD drive. Could anyone help please?

    It sounds like your HD may have died.
    If you could answer a few questions it may help figure out what you should do next:
    What OS did you have on your computer before you tried to upgrade to mavericks?
    Did your computer originally come with installer disks?

  • How to create and use library JAR files with command-line tools?

    Development Tools -> General Questions:
    I am trying to figure out how to put utility classes into JAR files and then compile and run applications against those JAR files using the command-line javac, jar, and java tools. I am using jdk1.7.0_17 on Debian GNU/Linux 6.0.7.
    I have posted a simple example with one utility class, one console application class, and a Makefile:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130520-2134.tar.gz
    Here is a console session:
    2013-05-20 21:39:01 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-20 21:39:12 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/hello/HelloConsole.java
    package com.example.hello;
    import static com.example.util.Hello.hello;
    public class HelloConsole {
        public static void main(String [] args) {
         hello("world!");
    2013-05-20 21:39:21 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -f hello
    find . -name '*.class' -delete
    javac src/com/example/util/Hello.java
    javac -cp src src/com/example/hello/HelloConsole.java
    echo "java -cp src com.example.hello.HelloConsole" > hello
    chmod +x hello
    2013-05-20 21:39:28 dpchrist@desktop ~/sandbox/java/jar
    $ ./hello
    hello, world!I believe I am looking for:
    1. Command-line invocation of "jar" to put the utility class bytecode file (Hello.class) into a JAR?
    2. Command-line invocation of "javac" to compile the application (HelloConsole.java) against the JAR file?
    3. Command-line invocation of "java" to run the application (HelloConsole.class) against the JAR file?
    I already know how t compile the utility class file.
    Any suggestions?
    TIA,
    David

    I finally figured it out:
    1. All name spaces must match -- identifiers, packages, file system, JAR contents, etc..
    2. Tools must be invoked from specific working directories with specific option arguments, all according to the project name space.
    My key discovery was that if the code says
    import com.example.util.Hello;then the JAR must contain
    com/example/util/Hello.classand I must invoke the compiler and interpreter with an -classpath argument that is the full path to the JAR file
    -classpath ext/com/example/util.jarThe code is here:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130525-1301.tar.gz
    Here is a console session that demonstrates building and running the code two ways:
    1. Compiling the utility class into bytecode, compiling the application class against the utility bytecode, and running the application bytecode against the utility bytecode.
    2. Putting the (previously compiled) utility bytecode into a JAR and running the application bytecode against the JAR. (Note that recompiling the application against the JAR was unnecessary.)
    (If you don't know Make, understand that the working directory is reset to the initial working directory prior to each and every command issued by Make):
    2013-05-25 14:02:47 dpchrist@desktop ~/sandbox/java/jar
    $ cat apps/com/example/hello/Console.java
    package com.example.hello;
    import com.example.util.Hello;
    public class Console {
        public static void main(String [] args) {
         Hello.hello("world!");
    2013-05-25 14:02:55 dpchrist@desktop ~/sandbox/java/jar
    $ cat libs/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-25 14:03:03 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -rf bin ext obj
    mkdir obj
    cd libs; javac -d ../obj com/example/util/Hello.java
    mkdir bin
    cd apps; javac -d ../bin -cp ../obj com/example/hello/Console.java
    cd bin; java -cp .:../obj com.example.hello.Console
    hello, world!
    mkdir -p ext/com/example
    cd obj; jar cvf ../ext/com/example/util.jar com/example/util/Hello.class
    added manifest
    adding: com/example/util/Hello.class(in = 566) (out= 357)(deflated 36%)
    cd bin; java -cp .:../ext/com/example/util.jar com.example.hello.Console
    hello, world!
    2013-05-25 14:03:11 dpchrist@desktop ~/sandbox/java/jar
    $ tree -I CVS .
    |-- Makefile
    |-- apps
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.java
    |-- bin
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.class
    |-- ext
    |   `-- com
    |       `-- example
    |           `-- util.jar
    |-- libs
    |   `-- com
    |       `-- example
    |           `-- util
    |               `-- Hello.java
    `-- obj
        `-- com
            `-- example
                `-- util
                    `-- Hello.class
    19 directories, 6 filesHTH,
    David

  • Hi I installed a new hard drive in my Mac mini osx lion an when I turn it on I get a flashing file with a question mark. I tried holding command and R keys when turning it on but the recovery fails to work. Does any one know how I can get it to recover?

    Hi I installed a new hard drive in my Mac mini osx lion an when I turn it on I get a flashing file with a question mark. I tried holding command and R keys when turning it on but the recovery fails to work. I can hold the option key at start up and choose my network, then Internet recovery shows up with an arrow pointing up. When I click on the arrow Internet recovery fails and all I get is a globe with a triangle on it with an exclamation mark on it, and under that it says
    apple.com/support
          -6002F
    Does any one know how I can fix this without a recovery disc? Thanks

    I just want to add to this, in case someone else searches for this error on Apple Support (google doesnt cover apple support.. how clever is that?)
    I had the same error. And i had a Computer that had worked, with a SSD drive and 16GB upgrade done by the owner himself.
    I tried swapping with a Mechinal Harddrive, no luck.
    Kept the Mechanical drive in, and tried with some other Ram, it worked..
    So for me this error and after reading the other responses can be boiled down to a Harddrive problem or Ram issue.
    It was Ram for me..

Maybe you are looking for

  • ORA-03113 : end-of-file on communication channel while running a SQL Query

    Hi, While executing the following query, we are facing ORA-03113 : EOF on communication channel error. SELECT FROM QDF_CLSS_SHENG_HIST /*WHERE* a.FACT_TYPE_CODE='BS' AND */ WHERE (SRCE_SYS_ID = 850 OR (SRCE_SYS_ID IN (1747,1764) AND GEO_ID IN (826,37

  • Operation Mapping issue in PI 7.1

    Hi there, I am working on PI 7.1 sp7, and have lots of interfaces running on it. There is something strange regarding Operation Mapping in Interface Determination, the thing is that when i try to assign a IM to the Interface Determination i could see

  • How to identify if modifiers are getting applied

    I am trying to define a modifer (Discount List), say Mod2, that needs to be applied only under certain conditions. I already have another existing modifier (Discount List), say Mod1, which returns the discount% using a Dynamic formula. The requiremen

  • Calculated field hidden when field is blank

    This is actually similar to a discussion from a few months ago.Our forms are intended to be filled out online, printed and e-mailed, faxed, or snail-mailed. Many times the customer will simply print out the form and fill it out by hand. When I create

  • Default text in me51n - line position text

    Hello, I have a strange problem in production. When we start a new PR me51n, filed the first position (10), the position text is automatically filled whit a default text, that the user must delete every time. This problem is appearing only in product