General :: Explanation Of Command To Uppercase First Letter Of Filename

Jun 10, 2010

I'm trying to learn to rename files with the command line, and after browsing around a lot of pages I finally found a command that uppercases the first letter of a file, but the problem is that I want to understand the meaning of each command. The command is:
for i in *; do new=`echo "$i" | sed -e 's/^./U&/'`; mv "$i" "$new";done
I understand the 'for' kinda... but not the 'echo' or '`' and especially the sed command.

View 4 Replies


General :: Explanation For TOP Command?

Jun 2, 2011

I need explanation for top command. If ran the TOP command,on top it shows few options like


View 3 Replies View Related

General :: Explanation Of Here Scripts As Well As The "cat" Command

Aug 13, 2011

I am currently in the very early stages of learning how to use the shell and write scripts (and I mean really early- only been at it for 3 days or so). Now I am following a tutorial, and I have reached a section about the so-called "here scripts" or "here documents".


Now what I don't understand is how those two scripts, once run, produce the same output.. I believe this is because I don't understand the "cat"-command (which is not quite useful, considering it seems to be a very practical and widely used command).

So would anyone care to explain to me what it does in this specific script as well as alternative applications? (And please refrain from just quoting the man-pages.. I have read them multiple times, and I still just don't get it - It's probably very simple,

View 11 Replies View Related

General :: Echo Enter The Letter A Or The Letter B?

Feb 11, 2010

Not sure why this won't work, any thoughts?echo enter the letter A or the letter B

read letter
if["$letter" = "A"]; then
echo "coolit's an A"


View 1 Replies View Related

General :: Set A Pattern That Will Output A Filename Equal To The Original Filename In SoundConverter?

Jan 23, 2011

$ uname -a
Linux a #1 SMP Thu Dec 23 16:10:47 UTC 2010 i686 i686 i386 GNU/Linux
$ lsb_release -a
LSB Version: :core-4.0-ia32:core-4.0-noarch


How can I set a pattern that will output a filename equal to the original filename? E.g.

something.mp3 → something.ogg

And why isn't this implemented in SoundConverter?

PS: {Filename} doesn't work.

View 1 Replies View Related

General :: Shell - What's The Difference Between Filename And ./filename

Apr 23, 2010

What is the difference between filename and ./filename? Under what circumstances is one preferred to the other?

View 5 Replies View Related

General :: Block Size Explanation In Plain English?

Apr 8, 2011

what block size means in plain English? I know block size 4k has 2 TB of file size limit and 1024 has around 17 GB. How do they calculate this?

View 3 Replies View Related

General :: Find/grep/wc Command To Find Matching Files - Print Filename And Word Count?

Sep 11, 2009

I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:

wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;

View 10 Replies View Related

General :: Calling Gurus And Noobs - Review Filesystem Hierarchy Explanation?

Jun 10, 2010

Back when I was first learning Linux, one of the questions that I kept wondering about was "what are all these files and directories for?" I couldn't find a resource that would explain them in a digestible manner. Specifically, I was looking for one that would allow me to look at a Linux filesystem interactively, collapsing and expanding folders to look at just the ones I was interested in at the moment. So later, when I got the opportunity, I wrote it.

But despite a ton of research, I'm still not totally knowledgeable on the subject. The most important thing I'm looking for right now is for experienced Linux/Unix people to tell me where I got stuff wrong, and for newbies to tell me how useful it is to them and which things need clarification. I'm also interested in technical and graphical ways to improve usability, like better icons, layout, etc. I know I need to be able to collapse long descriptions, but what would you like to see? The Works Cited list and a full introduction are still on the way as of this writing.

Without further ado: Linux Filesystem Hierarchy Explanation. You'll need a fairly recent browser that can handle XSLT; the actual info is stored as XML, and transformed into HTML with an XSLT stylesheet. This is still a work in progress, and I'll be updating it as the thread progresses.

Finally, would people be interested in collaborating with me on this, as an open-source project? I've never done anything like that, and I'm not sure how much time I'll be able to give it in the future, but I really think this should be continued and expanded.

Edit: Works Cited and decent intro are now in place.

View 3 Replies View Related

Fedora :: Command Line To Recurse And Delete Filename-1.jpg?

Oct 26, 2010

I just installed Picasa from google and it has corrupted my picture database. The good thing is that it has done it in an organized manner. It appended -1 -2 -3 and so on to the copies file name. They look like (filename.jpg filename-1.jpg filename-2.jpg) the original having no numerical suffix just (filename.jpg)How do i write a command line to remove all of the undesirables without deleting the origionals?

View 7 Replies View Related

General :: Separate Lowercase And Uppercase In File?

Jun 14, 2010

I have a file partially like this

209 c 89
215 a 76
603 B 190
626 f 240

I want to separate this file into two sub-files based on the lowercase and uppercase of column 2 so that the sub-files are like


209 c 89
215 a 76
626 f 240
603 B 190

View 4 Replies View Related

General :: Translate Lowercase File Names To Uppercase?

Nov 26, 2010

Kernel, Slackware 12.0

As a result of having mixed files from different filesystems, I have, in directory foo/, files with filenames in uppercase and files with filenames in lowercase. If I want to convert them to all uppercase how do I do it? Consider this will be later recorded into optical discs.

View 7 Replies View Related

General :: Mounting CDROM With File And Directory Names In Uppercase?

Mar 25, 2011

We have an application that on a SCO box that we are converting to Linux.Basically it mount a CDROM drive and pulls data files off of it. We can mount the drive and it displays all the file/directory names in uppercase. Is there a way to do it in Linux?

View 2 Replies View Related

Server :: Split A Filename Into Its Filename And Extension?

Apr 6, 2010

I need to split a filename into its filename and extension, so I can append a datestamp to the filename. I'm using bash.

View 8 Replies View Related

CentOS 5 Hardware :: How To Compile Filename.c Into Filename.o

Nov 20, 2009

I've installed ethernet adapter, it is made in china from a manufacturer called FOX. The driver for that adapter is supported for sco linux kernel version 2.4.x and 2.5.x .However, I'm using Centos5 but the OS didn't recognize the adapter alone, so I'm trying to follo instructions on the driver on the attached CD.

The CD contains file named "SC92031.c", the instructions tell me to do the following "Compile the driver source files and it will generate sc92031.o"

View 8 Replies View Related

General :: Convert All File Extensions For Files In Many Sub-directories From Uppercase To Lowercase?

Sep 21, 2010

I'm trying to convert all file extensions for files in many sub-directories from uppercase to lowercase. I have two problems, how to list the absolute path to the files recursively over many sub-directories for which I so far have this:-

find ~/Photos -print which would be fine, except it gives the directories on their own when it finds them rather than just the files with absolute paths. I couldn't find a switch for the "ls" command to do this, so I had to improvise with "find". and once I get grab each absolute file name, to just change the file extension rather than the entire file, which is what I have at the moment.


View 7 Replies View Related

Software :: Difference Between <filename>.rpm And <filename>.src.rpm?

Nov 22, 2010

what is the difference between <filename>.rpm and <filename>.src.rpm?

View 2 Replies View Related

Programming :: Convert A Dynamic Library ( To A Static Library (filename.a)?

Nov 18, 2009

How can we convert a dynamic library ( to a static library (filename.a) using gnu gcc . Can we get a static library form a dynamic library . I saw a few post in which the conversion form a static library to a dynamic library is mentioned but, unfortunately, not the other way.

View 4 Replies View Related

General :: Convert Document From Size A4 To Letter

May 12, 2010

Want to format document from size A4 to letter.I need to format some documents from A4 to print on letter size paper. The documents are Word documents and pdf.

View 4 Replies View Related

General :: Finding Commands Starting With A Given Letter Like For Example 's'?

May 24, 2010

find commands starting with a given letter like for example 's'?

View 6 Replies View Related

General :: Looking To Mount Root Dir To Windows Drive Letter

Apr 18, 2011

I have a RH5 box and develop on Windows. I'm looking to mount the root dir of the RH machine just for ease of integration and automatic deployment to the linux box. I'm using WinSCP at the moment but that (from what I can find) only opens a window, which isnt accessible from eclipse.

View 1 Replies View Related

General :: Mapping Sftp/scp As A Drive Letter Without User Logins?

Aug 24, 2011

I'm trying to find a software which could map sftp/scp services to a windows drive letter. I know there are quite a bunch of those available, but i haven't found a single one which could run with SYSTEM or Netservice privileges or have decent command line options so i could elevate the program myself. The mapped drive should be available for other services running on the same server.

Most of the programs (sftp netdrive, expandrive, etc) have only option to startautomatically only when someone logs in. Because of that they are useless to me.Their inability to handle non-interactive starts is a bummer too. FTP->SFTP wrappers don't count as solution despite of integrated windows support for ftp drives. The way they are handled in windows makes ftp mapping unusable without some external ftp drive mapper software.

View 2 Replies View Related

General :: Copy A File X Times Renaming It With All Alphabet Letter?

Sep 11, 2011

this seems to be a strange question, i know. I've a database sqlite file called "a.db".I need to copy it 20 times (1 time for each letter of the alphabet) to have : b.db, c.db , d.db.

View 1 Replies View Related

General :: Make System Partition Letter / Number Designations Persistent?

Aug 15, 2010

Everyone who deals with Linux knows that partitions on hard drives are designated as "sdx#", i.e., sda1 sdb2, etc. I know through experimentation that the number portion of the designation is assigned not according to order on the disk, but chronologically in the order they are created.

Further, if you have several partitions on the disk-say, sda1 through sda3-and you delete sda2, the designation of sda1 will remain the same, but sda3 will become the new sda2. The creation of any further partitions on the drive will start with designation sda3 and increment from that point.

At times this creates a conundrum, especially concerning bootable partitions. Some time back I rendered a partition containing OpenSUSE unbootable because of this, even though Ubuntu owned the GRUB bootloader in the MBR. Ubuntu's GRUB could find and point to the partition using the command "sudo update-grub", but when OpenSUSE took over the boot-up process, its GRUB was pointed to the wrong partition and would freeze up.

My question is this:

Under Windows, one is able to make a Drive letter persistent. Windows will keep the drive letter for that partition and assign around it. Is there a way to change a drive designation number, or at least make it persistent, under Linux? It would be a handy method to forestall these types of booting problems, among other things.

Presently, when a person has installed Linux side-by-side with Windows and want to delete the Windows partition and expand the Linux partition into the free space, I will tell them to format the partition, then shrink it to next to nothing instead of deleting it. This preserves the partition ID scheme while giving them the space to expand their Linux partition into...especially helpful with a seasoned Linux installation that would be a PITA to reinstall and set back up.

Oh, and I already know about UUID. This article explains it, but if you look down through the comments, you will see reasons that it is problematic for desktop application and usage. I want to make it as simple as possible for new Linux users (and myself! ).

View 4 Replies View Related

Applications :: Browser Download - Firefox Explanation Mentions Lots Of Files That Are Cant Access

Mar 12, 2010

My family have three Linux operated ACER ONE netbooks, all of them need the new Firefox 3.6 download as the old format wont be supported supposedly by ..... etc. I have downloaded the SOFTWARE but cant get it to run, the Firefox explanation mentions lots of files etc that are cant access, nor can I excecute any files once they have been extracted. The same happens with any software but Iv ignored it till now, not having a "modern" browser will make things difficult. I need it explaining simply. On another subject can anyone use facebook chat on Linux

View 6 Replies View Related

General :: Get Substring Of Filename?

Oct 28, 2010

i have filename like the following



actually i want to extract the substring between 2 underscores
e.g. in case of 1_40_37573.dbf i need 40 and in case of 1_101_37373.dbf i need 101 and so on

View 8 Replies View Related

General :: Create A .tgz With The Filename?

Apr 21, 2011

I have some school work that involves creating a script that creates a backup of my /home folder, everything goes well but the problem is with the filename.

I am supposed to create a .tgz with the filename : hostname-day-date-HH:MM:ss.tgz

The .tgz gets created with the correct filename but when I try to unpack it the filename can't be resolved, it's the : that mess things up.

View 2 Replies View Related

Ubuntu :: How To Put `hostname` In Uppercase

May 3, 2010

How i put `hostname` in uppercase in this case:date +"%Y%m%d%T" > date_`hostname`.txt Best wishes,Andr Barradas

View 3 Replies View Related

General :: Can Source Filename Be Used In Makefile

May 7, 2010

in directory a_dir, have a file named a_file.i can type "source a_file" under directory a_dir and execute successfully.but if i write the command to a Makefile under directory b_dir, the "source" function can't be executed well. it will generate some error message like this:

./a_file: line 1: setenv: command not found
./a_file: line 2: setenv: command not found
./a_file: line 3: setenv: command not found
./a_file: line 5: setenv: command not found

View 3 Replies View Related

General :: Extract Last Number From Filename

May 27, 2010

I have to extract last number from filename.

ex- my file name is a10b8c1000

so i want to extract 1000 from it.

i tried using sed
sed 's/[a-z][0-9]*[a-z][0-9]*[a-z]//g' a10b8c1000

but sed looks for content inside file.

View 8 Replies View Related

Copyrights 2005-15, All rights reserved