General :: How To Sort Filenames Numerically

Oct 1, 2009

I am using Red hat linux .. i just wanted to know, is it possible to arrange or sort filenames numerically?i have saved several files with the follwing names : 1.png, 2.png, 3.png, 4.png ...... 11.png 12.png. and so on.... but the containing folder sorts this alphabetically in the following manner 11,12,13...... 1, 2, 3, and so on...

View 6 Replies


ADVERTISEMENT

General :: Sort The 3rd Column In A Table Numerically

Jun 22, 2010

i wanna sort the 3rd column in a table numerically ( no actual borders...only tabs seperating the columns)
it should be something like this but i cant get it right

Sort -u +1 -3 results

the file is called results

View 7 Replies View Related

Software :: Get Nautilus To Sort Filenames In Lexicographical Order?

Mar 14, 2010

I have a bunch of files named in hexadecimal, which get displayed in order 0A, 0B, 0C, ..., 0F, 01, 1A, 1B, ..., 1F, 02, 2A, ... 2F, 03, 3A, ..., 9F, 10, 11, 12, ..., 99, A0, ...

How do I get them displayed in the correct order?

View 1 Replies View Related

Software :: Bash - Rename Filenames With Corresponding Filenames?

Dec 1, 2009

I got a filename called like this:

beach---------20090808-110000.ogg
beach---------20090808-120000.ogg

It's like this:

name----------YYYYMMDD-hhmmss.ogg

Now Im splitting these hourly files into 1 minute files. I get then this output sofar properly:

beach---------20090808-110000_00.mp3
beach---------20090808-110000_01.mp3
beach---------20090808-110000_02.mp3
and so on....

the 00, 01, 02 and up are the minutes it has splitted it. Now I need a script, after it did this, to rename the file names into this:

beach---------20090808-110000.mp3
beach---------20090808-110100.mp3
beach---------20090808-110200.mp3
beach---------20090808-110300.mp3

View 4 Replies View Related

General :: Listing Filenames Without The Directories?

Oct 3, 2010

list filenames one-per-line, in BASH without including directories. I think he was either wrong or making that up. There is a way to list just the names and one per line but there aren't any arguments I can find that can be used to exclude directories.

Code:

IFS=', '; files=`ls -m`; for i in $files; do if [ -f $i ]; then echo $i; fi; done That does only use ls as a command, however he said his GSI thought he could do it without all that...

Quote:

ricky@ricky-desktop:~$ ls -l
total 1376
drwxr-xr-x 2 ricky ricky 4096 2010-10-02 22:17 Azureus Downloads
drwxr-xr-x 4 ricky ricky 4096 2010-10-02 22:16 Desktop

[code]....

View 6 Replies View Related

General :: Read Mp3 Filenames From A Dir And Write Id3?

Nov 30, 2010

if i have a dir with several mp3's files:

example:

[root@xxx]ls -l
-rwxr-xr-x 1 web2 client1 6222573 Nov 26 17:34 01 Artist1 - Song1.mp3
-rwxr-xr-x 1 web2 client1 4989384 Nov 26 17:34 02 Artist2 - Song2.mp3
-rwxr-xr-x 1 web2 client1 6987438 Nov 26 17:36 03 Artist3 - Song3.mp3

and i need to update the id3 tag of all files with the command:

/usr/bin/id3v2 -a "Artist1" -t "Song1" Artist1 - Song1.mp3

how i do a loop to read the filename and execute the id3v2 command for each file, as i have filenames with spaces and special chars ex:"".

View 1 Replies View Related

General :: How To Use Rsync When Filenames Contain Double Quotes

Jan 29, 2011

I am trying to synchronize the content of the directory my_dir/ from /home to /backup. This directory contains a file which name has a double quote in it, such as to"to. Here is my rsync command:
rsync -Cazh /home/my_dir/ /backup/my_dir/

And I get the following message:
rsync: mkstemp "/backup/my_dir/.to"to.d93PZr" failed: Invalid argument (22)
For info, rsync works well when the synchronized filenames contain single quote, parenthesis and space. Thus, why is it bugging with a double quote?

View 3 Replies View Related

General :: Check If Filenames Are Lowers Case?

Feb 5, 2010

What would be the best way to verify files in a folder are all lower case and if a file is not lower case, output the filename to the screen.

View 11 Replies View Related

General :: Regex - Using Find To Locate Filenames Before A Certain Date?

Jul 11, 2011

I have a ton of files that are timestamped directories. These all look like2011-06-24_13.53.36 // a directory name for june 24th, 1:53:36 pmI have thousands of these directories. I want to do operations on some of the older ones. Let's say I give it a string for date time that matches that exact format, like i'll give it2011-06-25_00.00.00 // june 25th, 12amI want to find all the directories BEFORE my time. So if i give the string for 12am on june 25th, i want to find all the directories before then.If not i can find EVERY directory i have like this and then filter after wards. The created/modified dates are not tied to the actual timestamp im looking for (that would make this easier)

View 2 Replies View Related

General :: Double Quotation Marks Allowed In Filenames?

May 19, 2010

I tried to move a file from my desktop to another folder; moving it was not allowed, for some reason. Neither was opening it and saving a new copy in the target folder. Would that be because the filename contains double (") quotation marks? Are they not allowed? The filename is Edit of Bob's "Lady Liberty" Article.doc. [Filename not enclosed in quotation marks here, to avoid confusion.]I just changed the double quotation marks to single quotation marks; that solved everything.

View 2 Replies View Related

General :: Bash Scripting - Removing Strings From MP3 Filenames

Oct 5, 2010

I've been surfing and searching the net quit a while now to make my own script, but I haven't been really successful ever since I want to make a script which can remove strings from my mp3 collection (file names).

For example:
Code:
101-bob_sinclar_feat_sean_paul-tik_tok_(radio_edit).mp3 --> bob_sinclar_feat_sean_paul-tik_tok_(radio_edit).mp3
10-Young Jeezy-Lose My Mind (78 Bpm) (Repack).mp3 --> young_jeezy-lose_my_mind.mp3

Now the problem is how can I remove the strings like:
101 & 10 (dynamic)
(%%% Bpm) (dynamic)
(Repack) (static)

View 11 Replies View Related

General :: Using Cut On File Full Of Ls -l Output To Display Only Filenames?

Oct 7, 2010

I have a file that contains "ls -la" output. I would like to display only the filenames, none of the other information before it such as permissions, ownership, size, and date.Would the cut command be the best way to hit this, or should I use Vim or sed?

View 6 Replies View Related

General :: Case Insensibility In Filenames And Rsync, Mount?

Nov 27, 2010

Is there a way of making rsync (an offspring of rcp) case insensitive? Perhaps mounting the file system (not linux) in some special way?

View 14 Replies View Related

General :: Character Conversion - Wrongly Displayed Filenames

Dec 10, 2010

Having problems displaying French chars. They are dumped into an nfs share by a Windows/cifs configuration which has been blamed for this unwanted behavior but when I transfer a file continaing � via WinSCP to the RedHat, instead of getting the filename Response.txt I see R?sponse.txt. When I refresh WinSCP to view the file it views it ok.

[Code].....

View 1 Replies View Related

General :: Delete Files With Complex Filenames With A Script?

May 24, 2010

I am trying to write a bash script to delete a file where I know the first part of the name, but it has spaces in it. The second part of the file name is a random set of characters. I was hoping to use a wildcard for this, but I keep getting a error massage saying file or directory does not exist. This is a simplified form of my script:

Code:
MYFILE=This is my file
rm "$MYFILE*"
The file may be something like "This is my file.123abc456.suffix"

View 14 Replies View Related

General :: Rename Some Files To New Filenames In Ascending Format?

Dec 8, 2010

Fox example.I want to rename the files below like this: test1.png、test2.png.....

-rw-rw-r--. 1 test test 20448 2010-12-08 20:11 2010-12-08-212440_1440x900_scrot.png
-rw-rw-r--. 1 test test 29799 2010-12-08 21:25 2010-12-08-212526_369x331_scrot.png
-rw-rw-r--. 1 test test 34167 2010-12-08 23:54 2010-12-08-235424_580x328_scrot.png
-rw-rw-r--. 1 test test 155202 2010-12-08 23:55 2010-12-08-235511_1440x900_scrot.png

View 2 Replies View Related

General :: Searching A Directory And Pulling Out Filenames With A Certain Pattern?

May 17, 2010

I would like to search a specific directory and pull out filenames that have this pattern: "_bsc_" Then I want to do some processing and move the file to another directory

View 5 Replies View Related

General :: Replacing Single Quotes In Filenames With Another Character

Jan 26, 2011

Can anyone offer a code snippet to recursively go through directories and replace any single or double quotes quotes found in a filename with another character (e.g. "_").If any of the filenames contain a single quote or double quote, then replace it with an underscore.

View 7 Replies View Related

General :: Convert Windows Filenames To *nix Notation - Use It On Shell With Md5sum?

Aug 25, 2011

I have some checksums.md5 verification files from an ntfs external drive, but using windows notation: instead of /, spaces between file names (not escaped), reserved shell characters (like (, &, ', to name a few). The checksums.md5 has a bunch of checksums and filenames:

[code]...

I want to use this checksums.md5 to verify the files that I've copied to my machine: but I'm on a Linux, so I need to convert the names inside checksums.md5 from Windows to Linux to use the md5sum utility from the shell. The first line in my example would become: f12f75c1f2d1a658dc32ca6ef9ef3ffc My Windows & Files (2010)/[bak]/testing.wmv Is there some application for this (converting a file listing, from windows cmd notation, to linux shell notation) or will I need to create a bash script using sed that just "replaces" what is "wrong" with the filenames

View 1 Replies View Related

General :: Lower-casing Filenames On Fat32 External Drive

Jan 6, 2010

I have an external harddrive which is fat32 (which was filled when I was on a windows system) with a lot of files on (> 200gb) which have mixed case filenames. I wanted to write a script to rename them all to lowercase however when I did I got an error saying that the filenames are the same (which I guess is true as FAT is case-insensitive). My issue is that I'm mounting this from a linux box now so it would make it a lot easier if things were lower case! I've already run a script to replace all spaces with underscores.

I know I could do this by first going through and renaming everything with a prefix and then renaming it back again (ie, rename File.Jpg to xFile.Jpg and then a second rename to strip that x off and rename lowercase to file.jpg) however I find this approach a bit messy and would prefer to do it all in one pass. Other than that, could I change the drive to ext4 without losing any files on it? The drive has a hell of a lot of stuff on there which is an archive of many years of files - I'd be absolutely gutted if I lost everything.

View 2 Replies View Related

General :: Allow Users Of Program To Choose Filenames With Unicode Chars?

Jun 9, 2011

I'm working with an embedded Linux (Montavista 5.0). I want to allow users of my program to choose filenames with Unicode chars like the German All Unicode chars are visible inside the program (dialogs, buttons,...) and I can write Unicode chars into files and read them. But it is not possible for me to create a file with an Unicode filename! I can't write such Unicode chars in the shell! I set my locals to "de_DE.utf8". locale charmap says UTF-8! But when I try

Every Unicode char is writte to the shell in this way with a leading The same happens when I write such chars from my program to the shell with printf!

View 1 Replies View Related

General :: Appending File Extensions To Filenames In Bash Scripts?

May 18, 2010

Suppose I have a variable called filename which contains the name of a file but the name does not contain an extension.

View 4 Replies View Related

General :: Automatically Appending Date To Filenames Of Photos Imported Using Shotwell Or F-spot

Nov 26, 2010

Is there a way to automatically append date to the filenames of the photos imported using shotwell or f-spot?

View 9 Replies View Related

General :: Bash - Using Find Or Grep To Locate Filenames With Accented Characters From A Different Encoding System (Windows)

Dec 6, 2010

I tried to tag late onto a question similar to mine on stackoverflow (Find Non-UTF8 Filenames on Linux File System) to elicit further replies, with no luck so far, so here goes again... I have the same problem as the OP in the link above and convmv is a great tool to fix one's own filesystem. My question is therefore academic, but I find it unsatisfactory (in fact I can't believe) that 'find' is not able to find non standard ascii characters.

Is there anyone out there that would know what combination of options to use to find filenames that contain non standard characters on what seems to be a unicode FS, in my case the characters seem to be 8bits extended ascii rather than unicode, the files come from a Windows machine (iso-8859-1) and I regularly need to fetch them. I'd love to see how find and/or grep can do the same as convmv.

[Code]....

View 2 Replies View Related

Programming :: Bash Shell Scripting / Using The Sort Command To Sort The Top 5 CPU Processes?

Feb 28, 2010

What options should I use when I'm using the sort command to sort the top 5 CPU processes (ps -eo user,pid,ppid,%cpu,%mem,fname | sort ??? | head -5) showing max to min usage?

View 2 Replies View Related

Programming :: SORT Command Versus Unix SORT

May 4, 2010

We switched from unix to linux and we have an old report that extracted data from a database, output to an ascii file and then sorted the results in the file based on different arguments. The report now blows up when it runs,and I can only guess it is because the options for sort on linux differ slightly from unix.For example, here is one of the commands issued from within the report app that ran on the old unix box:

if sort-sequence = "descending" then
'sort -t~" -f +3.0f -4.0 +5.0r -6.0 -f '
else
'sort -t~" +3.0f -4.0 +1.0f -2.0 -f'

I will eventually rewrite the report to store the data in a local table, but I can simply adjust the options to suit the requirments of linux. Basically, I need to know if this can be a quick fix for the short term.

View 2 Replies View Related

Programming :: Fopen Bug In Filenames?

Aug 20, 2010

I try to call fopen with path like

Code: char *tmpbuf = (char*) malloc(BUFSIZE);
strcpy(tmpbuf, "/home/schmidt/images/4414b-22.jpg");
FILE *fd = fopen(tmpbuf, "rb"); or

[code]....

View 3 Replies View Related

Fedora :: Create Filenames Using The Date

May 5, 2010

I am currently working on a script which makes regular backups of some data I have, and I would like to name the compressed TAR files with the date it they were created, in short I want to rename a file:

OriginalName.tar.gz --> AnotherName-30-05-2010.tar.gz

Is there an easy way I can accomplish that? How?

View 14 Replies View Related

OpenSUSE :: Fix Invalid Filenames In Thunderbird

Jun 5, 2010

I want to travel for a while and need winfdows 7 for that. I want to copy my Linux Thunderbird profile with many years of emails across to windows7 then back to Linux when I'm finished with win 7. I copy the "profiles" folder at ~/.thunderbird/profiles folder over to win 7. Being thorough, I then run the windows app "chkdsk" to see if windows dislikes what I did in a filesystem context. Chkdsk finds three illegal filenames in the copied folder. The filenames contain colons.

They are as follows:
a directory named "mailbox:"
a directory named "mailbox:.sdb"
a file named "mailbox:.msf"

I try to manipulate them in windows (e.g. rename, delete, open, whatever) and get error messages about invalid names. It sounds to me like the items really are corrupt. So now I have a partially corrupted Thunderbird that works in Linux and doesn't work in windows and has years of emails in it. How do I straighten out Thunderbird in Linux? (I'll worry about windows later)

View 9 Replies View Related

Software :: Duplicated Filenames In The Same Directory?

Apr 3, 2011

The (WD 320GB) drive has a single ext3 FS on it. It has had some problems in the past, but all were fixed with fsck -y. Now there are several directories with duplicate filenames. The files with duplicated names are hard links of each other, but the names are identical. I've run several diagnostics over them, looking for, eg, non-printing characters in the name, but they are completely identical. Here are some examples:

[code]....

These are (obviously) from a directory of mp3s, but similar duplications occur throughout the fs - there are several thousand files affected. Some of the diagnostics were programmes I wrote that accessed the directory itself (through the dirent structure). I always thought duplicate filenames in the same directory were impossible in unix/linux; this appears to prove me wrong. Am I missing something? (Kernel version 2.4.20 with xfs extensions. The installation was originally Red Hat 7, but I've changed almost everything, so it's probably more accurate to call it a custom distro.)

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved