Creating weird filenames

Hi all,
After I read this article, http://www.dwheeler.com/essays/fixing-u … names.html (with which I actually agree in most points), I wondered how one can create files with such weird names.
I tried a lot, but did not succeed in it.
I am interested in this, because I am writing a php script that will parse user input to "ls". Allthough I guess I will just forbid all weird filenames and restrict them to the Portable Filename Character Set, I still was interested (just for the heck of it).
I guess such things can be done with C quite easily, but is it possible with Bash? Have any of you ever experimented with black arts like this?
Eager to know about your dirty hacks
jocom

You can specify any character in bash by the following syntax $'\xHH' (HH is the hexadecimal code of the character). Some specific syntax are also supported.
Some funny file names
touch beep$'\x07'
give a file name with a beep in it (echo * will give you an audible beep; ls seems to filter these funny characters).
touch Hello$'\n'World
give a file name with a newline in it (again visible by echo *).
Last edited by olive (2011-01-13 20:02:47)

Similar Messages

  • Weird filename are getting created in archive directory.

    Hi All,
    Weird filename are getting created in archive directory.
    I have one ftp adapter,after the file getting processed the file's are getting moved to archive directory.
    But with some different file name/ filename are randomly generated. But the content of the file remains the same.
    Pls suggest.
    Thanks.

    This is standard functionality, it uses the original filename with a suffix of the datetime.
    cheers
    James

  • How to close pictures that are opened by JAI.create("fileload",filename)

    After doing some deletion tests, it seems that all picture I'm loading with
    JAI.create("fileload",filename) or JAI.create("filestore",pb) stay open and prevent me from deleting those pictures.
    Do you have an idea on how I could close those pictures ?
    thank you !
    Edited by: dnlfrnc on Feb 13, 2008 10:42 AM

    Short answer: you can't if you use JAI.create("fileload",filename) :you can't rely on making a call to the garbage collector, because you can't be sure it will work.
    Instead, use the sream operator:
           FileSeekableStream stream = null;
            try {
                stream = new FileSeekableStream(sourceImageFile.getAbsolutePath());
                // use the stream operator because the fileload operator does not allow to release the handle on the opened file
                PlanarImage input = JAI.create("stream", stream);
                // do your stuff
            } finally {
                // close the stream.
                stream.close();
            } Why you don't have any means (besides gc, but I don't call that an option) of releasing the handle on a file you opened with the fileload operator is beyond me, though (especially as this operator is widely used in the tutorials, and thus is bond to end up in a lot of code)

  • Automatically creating data filename out of date and time information

    I read somewhere (in a book, here ?) about a programmer who never keyed in a data filename to save his data file. He just used the system date and time to create his filename. For example: now would be 20028141032.dat (2002, August 14, 10:32 am)
    I am looking to do something similar. I do want to add a spot of text after the date and time and save it as *.xls.
    This way when you have a long list of data files, if you sort by name, they are sequentially in order.
    Thanks for any help.
    Terry

    Hi Terry,
    You can use "Seconds to Date/Time" Funtion along with "File Dialog" Function to accomplish your task. You Unbundle the cluster from the "Seconds to Date/Time" with Year, Month, Day, Hour and Minute Information Convert and Append into One String. You Can add Pre or Post text to this String. Wire this to File Dialog Box and it will Pop up the Window With File Name in it as Default. Also the extemsion of the file name can be specified here. The User has Option to change this or accept this default name.
    I have attached an Example Vi to Illustrate this(LV6.1) Take a Look. To Use this Just Wire the Path Information to your Saving Functional VI. Also the Vi Checks if File Exists or Dialog Box is Cancelled. And You may Build Functionality for the
    se if you need them.
    Good Luck.
    Mache
    Good Luck!
    Mache
    Attachments:
    DateStamped_File_Name.vi ‏29 KB

  • EEM variable for show command output and create a filename

    I'm configuring EEM applet, example CPU High event. When it triggers the event, action is "show tech | redirect tftp://x.x.x.x/showtechoutput". The EEM event is working fine and triggered the show tech output into the tftp server. My question is, i'd like to add maybe date/time in the filename so it will not overwrite the file everytime there is a triggered event.
    The EEM event variable i'm seeing in doc is "_event_pub_sec" but it won't work when i add after or before the filename. any idea?
    thanks in advance ...

    Adding $_event_pub_sec to the end of the filename should work:
    action 1.0 "show tech | redirect tftp://x.x.x.x/showtech.$_event_pub_sec"
    That said, TFTP is very particular about how files can be created.  Typically, a TFTP server will require the file to exist before a remote host can copy to it.  If the filename changes each second, this will not work.  Using a protocol like FTP or SCP may work better.

  • ID CS5.5 book creates weird page flow in PDF

    I am using ID version 7.5.2 and Acrobat 9 Pro Extended (version 9.5.0).
    I created an InDesign book (indb) that condains an indd file for each chapter. There are about 20 chapters so far, typically 4 to 7 pages each. The documents all use the same 2-page spread. The page numbering is automatic. And the document setup dialog has "facing pages" checked.
    When I use the default preset in the File menu to create a PDF (using all default settings, no changes in the dialog), it successfully creates the PDF, but the flow of pages is not as expected. Specifically, Acrobat and Reader seem to be treating each 2-page spread (when in the same indd file) as a page. With Page Display set to "Single Page View," Reader shows me page one alone and then pages 2 and 3 side by side. And so on, so that whenever a 2-page spread is from a single indd file, Reader treats them as one page. And when pages which should face each other are from different indd files, they appear separately, one below the other.
    Other types of Page Display settings give similar weird behavior. For example, "Two Page View" might show pages 20 and 21 as the left page and pages 22 and 23 as the right page as long as all of that content comes from the same indd file.
    Any ideas about what I'm doing wrong? Or, alternatively, is there anything I can do in the full Acrobat to get the display behavior back to the usual facing-page format?
    Note that I have been using ID for many years, but have not used the Book feature (indb file) recently. I'm using the Book feature this time because I plan to create an EPUB and I understand that the easiest way to force each chapter to start at the top of a page is to put each chapter in its own indd within a book.
    Thanks in advance for any assistance.
    John

    Thanks, Peter and Rik,
    With your help it's working 90% correctly. I didn't notice at the bottom of the dialog where I'm asked for the file name to save as that it was defaulting to PDF (Interactive). Once I changed it to PDF (Print), I started seeing consistent 2-page spreads in Reader/Acrobat when I set Page Display to 2-page.
    One small step to go. I'd like to see all odd-numbered pages on the right, as in a printed book (even though that means the first spread in Reader will have no page on the left). That behavior will put the page numbers at the outside edge and not near the gutter.
    I've tried setting "Next Odd" in the Book Page Numbering Options dialog but, as expected, that made every chapter begin on an odd-numbered page. I just want the first indd to start on an odd page.
    I've also tried toggling the Spreads checkbox and the Facing Pages checkbox, but changes there only make matters worse.
    Bottom line: where can I tell InDesign (or Acrobat, if necessary) to always show page 1 and all odd-numbered pages on the right when Reader is in 2-page display mode?

  • Creating a filename based upon entered fields

    Using Acrobat 7, I have two fields that I would like to draw upon to create a unique filename under which the document will be stored.
    Field #1: Name.Last (no formatting)
    Field #2: Date.From (formatted as mm/dd/yyyy)
    If #1 = "Smith" and #2 = "02/03/2008", the unique name created would be "080203-smith".
    So I need to concatenate and then store.
    Any suggestions?
    Steve

    As Earlierly suggested, the Outputs PS from the ReadPropSet method does not match the fields defined in the init method.
    And One More thing as i observed
    var fileLoc = "c:example.xml"; ( As u Declared)
    should be
    var fileLoc = "c:\example.xml";
    Just Try Once :-)

  • Can java create unique filenames?

    DataOutputStream out = new DataOutputStream(new FileOutputStream(fileName));
    String fileName = "c:/" + Integer.toString(stuff) + ".txt";
    out.write(stuff);
    The reason that this is important, is because I want to be able to create a unique filename each time I run the program (which records important data). I dont want the data overwritten within the same file over and over again.
    currently my program looks like this:
    DataOutputStream out = new DataOutputStream(new FileOutputStream("c:/data.txt"));
    out.write(stuff);
    each time I run the program however, the data.txt file will just get overwritten. How can I make my program resemble the one above without Java rejecting the codeing?

    I defer to DrClap - it does seem to work. Usingthe following codeimport java.io.*;
    public class Test {
        public static boolean createTempFile (String prefix, String suffix) {
            try {
                File.createTempFile(prefix, suffix);
            catch (IOException e) {
                return false;
            return true;
        public static void main( String [] args ) {
            System.out.println(Test.createTempFile("foo", "bar"));
            System.out.println(Test.createTempFile("bar", "foo"));
            System.out.println(Test.createTempFile("foo", "bar"));
    }I get files of the form
    fooNNNNNbar created. So my question is when would his EVER throw an IOException?

  • Smudge Tool Problems, Creating weird colors.

    Hello!
    I have been strugling with this problem for hours now. The smudge tool creates some weird gray/random color(s) when im trying to smudge instead of fading. I have reseted all tools and i have reinstalled PS C4 and nothing helps.
    Picture of the problem.
    http://i60.photobucket.com/albums/h11/kas006/Problem.png
    No matter what strenght or size i use it ends up the same.

    that should go away after a few more strokes or you could just use Liquify as that produces way better results than the Smudge tool

  • After Leopard install "unable to create /folder/filename..."

    I have upgraded my MacBook and iMac to Leopard, no problems. However, on my iMac (only), in many applications I get an error message when I'm trying to save a file. For example, in iPhoto if I export to desktop I get an error message "unable to create.... /folder/directory filename". Same thing if I export to an already existing folder. However, files I make and save with Word etc. work fine. Is there some selective locking device on Apple?
    John

    Hello Rollie2t,
    Welcome to the HP Forums.
    I see that you are having an issue with installing the printer on to your Windows Vista computer.
    Please make sure that you do NOT have the usb cable connected to the printer and the computer when doing the download and the installation.  You will be prompted as to when to connect the usb cable during the installation so please do NOT connect it before hand.
    I also suggest that you disable the Windows Firewall and any anti virus protection before attempting to download the software and drivers.
    Here is the link for the HP Deskjet Full Feature Software and Drivers.
    If the troubleshooting does not help resolve your issue, I would then suggest calling HP's Technical Support to see about further options for you. If you are calling within North America, the number is 1-800-474-6836 and for all other regions, click here: click here.
    Thanks for your time.
    Cheers,  
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Why we create Logical filename what is the significance.

    Hi Friends,
           What is the use of Logical file name. Where we use it.
    Thanks&Regards,
    Naren.

    importance of LOGICAL FILE :
    lets say we are in development server and the application files are in /int/<b>D01</b>/...../temp/file1
    to read the file FILE1 above ,we have to give total path(we call it as PHYSICAL PATH) to the OPEN DATASET statement.
    lets say we are working in the production server and the same file may be in different location. to read the file,again USER has to give the total path.then only OPEN DATASET can find the file.
    /int/<b>P01</b>/...../temp
    if we use LOGICAL PATH,
    we are creating a logical path for a particular physical path.
    lets say
    zlog_path : /int/<b>D01</b>/...../temp/
    we will create ZLOG_PATH as logical path and assign the value to that as above(the physical path).
    lets say in production,
    we will create the SAME LOGICAL PATH NAME but the physical path name will differ
    zlog_path : /int/<b>P01</b>/...../temp/
    the advantage here is,
    user will give only the logical path and file name on the screen. he dont give the full physical path where ever he executes his report either in development or in Production.
    we create a logical path using FILE transaction.
    Re: logical path
    check this link.
    Regards
    srikanth
    Message was edited by: Srikanth Kidambi

  • Create a filename based on form content

    Hello,
    I always have a hard time explaining my question's but here goes.
    I have a button which saves a form once filled out. I would like to take the thinking out of this when it comes to naming the file and it create the name based on a numerical field in the form (in this case a serial number). The example would be something like 00000_Inspection Form.pdf. I am certain this can be done with  javascript but not being a programmer, I have no idea where to begin with this. I have a variable set up but no idea how to act upon it.
    thanks in advance.
    Brad

    Hi
    try this syntax
    Sum(HrsWorked)/(Count(Payperiod) In Report)
    Regards,
    Stratos

  • Create unique filename by auto-incre​ment path

    I needed a program that would take in a pathname, see if the file name already existed at that location, and if so it needed to auto-increment the file name. I wanted it to work the way windows inherently does when you copy a file of the same name into a location because that seems the most natural to me. I was running into problems with the ftp functions in the internet toolkit becaues if the local file already exists at the path you input, it just doesn't perform the get files function.
    I discovered after searching the forums that a lot of people run into this all the time and usually the way they get a unique file name is by adding the date and time to the end of the file. This is both effective and informative, but results in unnecessarily long and ugly file names. 
    So I made a subVI and I wanted to share it with you guys. Hope someone finds it useful. Let me know what you think.
    [will work for kudos]
    Attachments:
    Unique File Name.vi ‏34 KB

    I took your suggestions
    - appended (T) to the check existence input description to indicate its default position
    - Created a "New Path?" output that idicates whether a new path was created (T) or if the inputted path was simply passed through (F)
    And for all the users who dont have 2009... Here are some older versions for you
    enjoy
    [will work for kudos]
    Attachments:
    Unique File Name.vi ‏35 KB
    Unique File Name_8-5.vi ‏44 KB
    Unique File Name8-6.vi ‏35 KB

  • IMovie creates weird frame flickering on export only -- please help!!

    Hello iMovie experts.. Need your advise!!!!!
    I've been using iMovie 11 for some time now... Had no issues... All of a sudden a few days ago,
    after I already burnt a disk, i noticed blinking in the clip where I had a 'Dream' video effect...
    I opened the exported mov file, and the blinking is there.... So I went to the project, no issues, - the clip that
    has the effect plays good, no 'flickering'..
    As soon as I export it -- on the clip where i apply a video effect, every second or so I see a black frame, or the blurred frame, or a frame as if the
    effect wasn’t applied to that clip....... 
    I tried exporting via almost everything... Export Movie, Export to QuickTime (no compressions, mp4, h264, etc), ... same thing
    is happening over and over...  I tried removing the Preference file from User\Library\Preferences file, but it did not help..
    I also tried duplicating a project. What happened was, the problem did not go away, but on top of that, it created about
    10 minutes of black video towards the end of the movie...... ?!?!?!?!?!
    I also removed Flip4Mac and Divx components... no luck...
    Can anyone suggest anything please??  thanks!
    Running latest Snow Leopard update...

    You know, i optimized a video once, and it was very jerky when it played at about 40% speed (slow-motion), vs. when I import non-optimized..
    I dont want to jump the gun yet, as the below doesnt really make sense, at least to me, BUT......
    What I noticed is that the flickering of the clips with applied effects only happens when there an opening
    transition in the very beginning of the project..  I placed a "fade-in" transition in the beginning so that the video  fades in as it starts....  As soon as i removed it.. it exports fine, no flickering, no nothing, back to normal..
    .... I also tried a few new small projects with and without the transition in the beginning and I would get the same pattern after export:  with a trans in the beginning of the clip with video effect, -- it would blink after being exported.. As soon as beginning trans removed -- back to normal..    I know... i doesnt make sense...
    I wonder if you can produce this:
    [fade in trans] [normal clip] [clip with Dream effect] [some other trans] [clip with some other Effect]
    and
    [normal clip] [clip with Dream effect] [some other trans] [clip with some other Effect]
    Thoughts??  I am scratching my head now!

  • Macbook creating weird application problem

    everytime i download a program; for example Skype, i follow everything and copy the icon to my application folder after installation is done. however, when i open my applications folder to use it, it has a weird "do not enter" logo instead of the regluar logo. how can i fix this?

    Try resetting PRAM, SMC, and safe boot. Most likely, that will not resolve the issue. Send it in for a repair.

Maybe you are looking for

  • Photos take years to open help!!

    i was a previuos owner of ipod photo and has tons of pics with a very good resolution and had no problem, now i have ipod video and takes f o r e v e r to open them and dont even think about put in a presentation. someone knows why or have the same e

  • Depressed Icon is not working for af:goImageLink

    Hi All, I am using JDeveloper 11.1.1.4.0 and trying to create a menu having some af:goImageLink components. I have given images in its Icon, hoverIcon and depressedIcon positions. Now everything is fine except depressedIcon. Actually my requirement i

  • How to set the link to the result which are executed my query from database

    Hi, i have successfully displayed the results which are available in the database by jdbc, query. Then, How to give the link like href to each & every result... note: The number of records may be change. depending upon the records availablity in the

  • Hyperion Performance Scorecard - Strategy Map - Node population ...

    Dear friends, we've got a development project of balanced scorecard and at the stage we are, we need to populate our Strategy Map tree with the Measures (on the leaves) and the Scorecards (intermediate nodes). The problem is that we have got 23 Strat

  • Sprite gets stuck in mid-movement

    I am having some trouble with a sprite not knowing when the mouse is outside it's bounding edges, and when it's inside. I have a script set up, so that when you roll over the particular sprite, it moves to the left 40 pixels, 10 pixels at a time so i