Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

small query about rm'ing files

  • 09-01-2003 11:09am
    #1
    Banned (with Prison Access) Posts: 23,556 ✭✭✭✭


    I have a file on a linux account called "--remove-files" ... created after a rather silly mistake using tar :)


    anyway. I can't figure out how to delete it.. when I try a simple rm I get
    <mordeth@frink> [~] $ rm --remove-files
    rm: unrecognized option `--remove-files'
    Try `rm --help' for more information.


    same problem with I try "--remove-files"

    when I try rm *remove* I get the same error too.. I even tried ls *remove* and got this

    <mordeth@frink> [~] $ ls *remove*
    ls: unrecognized option `--remove-files'
    Try `ls --help' for more information.


    any ideas? it's not incredibly important but still.. it's annoying having it there


Comments

  • Registered Users, Registered Users 2 Posts: 6,265 ✭✭✭MiCr0


    use the full path
    so if its in /blah/blah
    # rm /blah/blah/--remove-files


  • Banned (with Prison Access) Posts: 23,556 ✭✭✭✭Sir Digby Chicken Caesar


    *mutter*

    5 seconds after posting this I remember all about #unix.ie

    thx Micr0 for the help :)

    for anyonte interested all I had to do was use the full path of the file

    rm /blah/blah/--remove-files

    and that worked :)


  • Closed Accounts Posts: 741 ✭✭✭longword


    Alternative method, and this works for nearly all the command line utilities, is to use -- to denote the end of all command line options (but not parameters). i.e.

    rm -- --remove-files

    Also handy if for example you're trying to grep for -v in a bunch of files. grep -v * isn't gonna work. grep -- -v * will bring much happiness and satisfaction.


Advertisement