Find the answer to your Linux question:
Results 1 to 3 of 3
This might seem a stupid question, but since I'm a novice, please bear with me. Is the fallowing command : $ rm -ri dir1 the same with $ rm -ir ...
  1. #1
    Just Joined! Fuzzy_duck's Avatar
    Join Date
    Jan 2011
    Location
    Romania , on the shores of Danube
    Posts
    6

    Reverse commands, and extensions

    This might seem a stupid question, but since I'm a novice, please bear with me.
    Is the fallowing command : $ rm -ri dir1 the same with $ rm -ir dir1 ? Or is there some sort of hierarchy?

    Also, what are the executables extensions in Linux (the equivalents of .exe , .com and .bat .)?

    Thank you.

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    Most programs -but not all- do not care in which order the options are given.
    In your rm case, it makes no difference.

    In doubt, read the manual page for the command.
    Code:
    man rm

    There are no executeable extensions.
    A file can be arbitrarily named and still be executeable.

    However -as a basis- it needs the x-bit set for either the desired user, desired group or others.
    Filesystem permissions - Wikipedia, the free encyclopedia

    If you call a ELF binary file with x-bit, the program loader will load the program ( oh really? ) into memory and jump to the program entry point.

    If it is a textfile with a valid shebang, then the program given in that shebang (bash, perl, python, whatever) is started with the textfile as argument.

    As a third possibilty, there is the binfmt_misc mechanism, that is more flexible compared to shebang, as it also works with non-textfiles.
    Last edited by Irithori; 01-19-2011 at 06:14 AM.
    You must always face the curtain with a bow.

  3. #3
    Just Joined! Fuzzy_duck's Avatar
    Join Date
    Jan 2011
    Location
    Romania , on the shores of Danube
    Posts
    6
    Thank you very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...