Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

Scheduled Pinned Locked Moved Uncategorized
35 Posts 27 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • chaoskitsune@woem.menC chaoskitsune@woem.men

    @rebane2001@infosec.exchange hmm I suppose thats because its writing nothing into the file but I dont understand the reason for the : (I mean yeah it does make the face but from a commands perspective I mean)

    Id assume it works without?

    Im guessing
    : is ignored or perhaps written into the file?

    lambda@chaosfurs.socialL This user is from outside of this forum
    lambda@chaosfurs.socialL This user is from outside of this forum
    lambda@chaosfurs.social
    wrote last edited by
    #3

    @ChaosKitsune @rebane2001 : is the no-op built-in in POSIX shells.

    pinkrhododendron@mastodon.socialP 1 Reply Last reply
    0
    • chaoskitsune@woem.menC chaoskitsune@woem.men

      @rebane2001@infosec.exchange hmm I suppose thats because its writing nothing into the file but I dont understand the reason for the : (I mean yeah it does make the face but from a commands perspective I mean)

      Id assume it works without?

      Im guessing
      : is ignored or perhaps written into the file?

      dakkar@s.thenautilus.netD This user is from outside of this forum
      dakkar@s.thenautilus.netD This user is from outside of this forum
      dakkar@s.thenautilus.net
      wrote last edited by
      #4

      @ChaosKitsune@woem.men https://www.gnu.org/software/bash/manual/bash.html#index-_003a

      the colon is a shell command that does nothing

      it's often used to perform expansions with side-effects, like:

      : ${ARGUMENT:=default value}
      : ${MUST_BE_SET:?error message}


      @rebane2001@infosec.exchange

      jcpandrade@mastodon.socialJ 1 Reply Last reply
      0
      • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

        in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

        the bird will eat the file and leave it completely empty!

        pinkrhododendron@mastodon.socialP This user is from outside of this forum
        pinkrhododendron@mastodon.socialP This user is from outside of this forum
        pinkrhododendron@mastodon.social
        wrote last edited by
        #5

        @rebane2001 It works ๐Ÿคฏ

        kaaswe@swecyb.comK 1 Reply Last reply
        0
        • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

          in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

          the bird will eat the file and leave it completely empty!

          artemis@with.iridium.inkA This user is from outside of this forum
          artemis@with.iridium.inkA This user is from outside of this forum
          artemis@with.iridium.ink
          wrote last edited by
          #6

          @rebane2001 I feed my evil bird junk files twice a day so they don't get hungry and start eating files I need

          1 Reply Last reply
          0
          • lambda@chaosfurs.socialL lambda@chaosfurs.social

            @ChaosKitsune @rebane2001 : is the no-op built-in in POSIX shells.

            pinkrhododendron@mastodon.socialP This user is from outside of this forum
            pinkrhododendron@mastodon.socialP This user is from outside of this forum
            pinkrhododendron@mastodon.social
            wrote last edited by
            #7

            @lambda @ChaosKitsune @rebane2001 does that like actually run the no-op in assembly//machine level ?? or actually do nothing and return 0 ??

            lambda@chaosfurs.socialL 1 Reply Last reply
            0
            • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

              in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

              the bird will eat the file and leave it completely empty!

              two@critter.cafeT This user is from outside of this forum
              two@critter.cafeT This user is from outside of this forum
              two@critter.cafe
              wrote last edited by
              #8

              @rebane2001 thanks i was hungry ๐Ÿ˜†

              1 Reply Last reply
              0
              • pinkrhododendron@mastodon.socialP pinkrhododendron@mastodon.social

                @lambda @ChaosKitsune @rebane2001 does that like actually run the no-op in assembly//machine level ?? or actually do nothing and return 0 ??

                lambda@chaosfurs.socialL This user is from outside of this forum
                lambda@chaosfurs.socialL This user is from outside of this forum
                lambda@chaosfurs.social
                wrote last edited by
                #9

                @pinkRhododendron @ChaosKitsune @rebane2001 the latter, there's no reason the *implementation* of the shell built-in would have to use an extra machine instruction that does nothing (though maybe the compiler sneakily inserts one anyway, e.g. for alignment reasons!)

                1 Reply Last reply
                0
                • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

                  in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

                  the bird will eat the file and leave it completely empty!

                  rebane2001@infosec.exchangeR This user is from outside of this forum
                  rebane2001@infosec.exchangeR This user is from outside of this forum
                  rebane2001@infosec.exchange
                  wrote last edited by
                  #10

                  aah i shouldve called it the mischievous bird not evil!!

                  1 Reply Last reply
                  0
                  • pinkrhododendron@mastodon.socialP pinkrhododendron@mastodon.social

                    @rebane2001 It works ๐Ÿคฏ

                    kaaswe@swecyb.comK This user is from outside of this forum
                    kaaswe@swecyb.comK This user is from outside of this forum
                    kaaswe@swecyb.com
                    wrote last edited by
                    #11

                    @pinkRhododendron @rebane2001
                    I would have also created an alias for the hungry cat to echo out on console
                    Burp, mjao

                    1 Reply Last reply
                    0
                    • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

                      in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

                      the bird will eat the file and leave it completely empty!

                      cenobyte@mastodon.thirring.orgC This user is from outside of this forum
                      cenobyte@mastodon.thirring.orgC This user is from outside of this forum
                      cenobyte@mastodon.thirring.org
                      wrote last edited by
                      #12

                      @rebane2001 This is awesome for clearing out files. Some log files when you're trying to isolate. Love learning new commands. Thank you!

                      draeath@infosec.exchangeD 1 Reply Last reply
                      0
                      • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

                        in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

                        the bird will eat the file and leave it completely empty!

                        benjaoming@social.data.coopB This user is from outside of this forum
                        benjaoming@social.data.coopB This user is from outside of this forum
                        benjaoming@social.data.coop
                        wrote last edited by
                        #13

                        @rebane2001 it doesn't eat worms `~` โ“

                        ```
                        $ ๐Ÿ˜† ~
                        bash: /home/user: Is a directory
                        ```

                        leeloo@c.imL 1 Reply Last reply
                        0
                        • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

                          in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

                          the bird will eat the file and leave it completely empty!

                          m000gletje@app.wafrn.netM This user is from outside of this forum
                          m000gletje@app.wafrn.netM This user is from outside of this forum
                          m000gletje@app.wafrn.net
                          wrote last edited by
                          #14
                          This post did not contain any content.
                          Link Preview Image
                          1 Reply Last reply
                          0
                          • dakkar@s.thenautilus.netD dakkar@s.thenautilus.net

                            @ChaosKitsune@woem.men https://www.gnu.org/software/bash/manual/bash.html#index-_003a

                            the colon is a shell command that does nothing

                            it's often used to perform expansions with side-effects, like:

                            : ${ARGUMENT:=default value}
                            : ${MUST_BE_SET:?error message}


                            @rebane2001@infosec.exchange

                            jcpandrade@mastodon.socialJ This user is from outside of this forum
                            jcpandrade@mastodon.socialJ This user is from outside of this forum
                            jcpandrade@mastodon.social
                            wrote last edited by
                            #15

                            @dakkar @ChaosKitsune @rebane2001 also infinite cycles:

                            while :
                            do
                            <whatever>
                            Done

                            dakkar@s.thenautilus.netD 1 Reply Last reply
                            0
                            • cenobyte@mastodon.thirring.orgC cenobyte@mastodon.thirring.org

                              @rebane2001 This is awesome for clearing out files. Some log files when you're trying to isolate. Love learning new commands. Thank you!

                              draeath@infosec.exchangeD This user is from outside of this forum
                              draeath@infosec.exchangeD This user is from outside of this forum
                              draeath@infosec.exchange
                              wrote last edited by
                              #16

                              @cenobyte @rebane2001 I usually just use truncate or echo "" > whatever but this is a lot more terse. I like it.

                              project1enigma@chaos.socialP 1 Reply Last reply
                              0
                              • jcpandrade@mastodon.socialJ jcpandrade@mastodon.social

                                @dakkar @ChaosKitsune @rebane2001 also infinite cycles:

                                while :
                                do
                                <whatever>
                                Done

                                dakkar@s.thenautilus.netD This user is from outside of this forum
                                dakkar@s.thenautilus.netD This user is from outside of this forum
                                dakkar@s.thenautilus.net
                                wrote last edited by
                                #17

                                @jcpandrade@mastodon.social ha! I tend to do while true because it reads better to me
                                (yes, I know that involves a fork+exec, but if we cared about speed we wouldn't be writing shell)
                                @ChaosKitsune@woem.men @rebane2001@infosec.exchange

                                jcpandrade@mastodon.socialJ 1 Reply Last reply
                                0
                                • chaoskitsune@woem.menC chaoskitsune@woem.men

                                  @rebane2001@infosec.exchange hmm I suppose thats because its writing nothing into the file but I dont understand the reason for the : (I mean yeah it does make the face but from a commands perspective I mean)

                                  Id assume it works without?

                                  Im guessing
                                  : is ignored or perhaps written into the file?

                                  odd@gts.oddware.netO This user is from outside of this forum
                                  odd@gts.oddware.netO This user is from outside of this forum
                                  odd@gts.oddware.net
                                  wrote last edited by
                                  #18

                                  @ChaosKitsune @rebane2001 : is a no-op with no output, which is then redirected to the file.
                                  See: https://stackoverflow.com/questions/3224878/what-is-the-purpose-of-the-colon-gnu-bash-builtin

                                  1 Reply Last reply
                                  0
                                  • dakkar@s.thenautilus.netD dakkar@s.thenautilus.net

                                    @jcpandrade@mastodon.social ha! I tend to do while true because it reads better to me
                                    (yes, I know that involves a fork+exec, but if we cared about speed we wouldn't be writing shell)
                                    @ChaosKitsune@woem.men @rebane2001@infosec.exchange

                                    jcpandrade@mastodon.socialJ This user is from outside of this forum
                                    jcpandrade@mastodon.socialJ This user is from outside of this forum
                                    jcpandrade@mastodon.social
                                    wrote last edited by
                                    #19

                                    @dakkar I used the true but... : is faster and easier to type... Just being lazy, I admit. @ChaosKitsune @rebane2001

                                    1 Reply Last reply
                                    0
                                    • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

                                      in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

                                      the bird will eat the file and leave it completely empty!

                                      bartholin@fops.cloudB This user is from outside of this forum
                                      bartholin@fops.cloudB This user is from outside of this forum
                                      bartholin@fops.cloud
                                      wrote last edited by
                                      #20
                                      @rebane2001 The nice bird is named sudo rm -rf /
                                      1 Reply Last reply
                                      0
                                      • benjaoming@social.data.coopB benjaoming@social.data.coop

                                        @rebane2001 it doesn't eat worms `~` โ“

                                        ```
                                        $ ๐Ÿ˜† ~
                                        bash: /home/user: Is a directory
                                        ```

                                        leeloo@c.imL This user is from outside of this forum
                                        leeloo@c.imL This user is from outside of this forum
                                        leeloo@c.im
                                        wrote last edited by
                                        #21

                                        @benjaoming @rebane2001
                                        ๐Ÿ˜† ./~

                                        1 Reply Last reply
                                        0
                                        • rebane2001@infosec.exchangeR rebane2001@infosec.exchange

                                          in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

                                          the bird will eat the file and leave it completely empty!

                                          lucypinder@mastodon.socialL This user is from outside of this forum
                                          lucypinder@mastodon.socialL This user is from outside of this forum
                                          lucypinder@mastodon.social
                                          wrote last edited by
                                          #22

                                          @rebane2001 It's a cool fact

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups