Ubuntu :: Move A File Matching *.ext Regardless Of Case

Jan 26, 2010

how I can use the mv command to move a file that matches *.ext regardless of the case?

I would like to be able to move:

*.ext
*.EXT
*.ExT

....and so on with a single command. I do not want to have to type out all combinations of this single file extension in my script because my file system is case sensitive.

View 9 Replies


ADVERTISEMENT

Programming :: Bash File Comparing - Report How Many Matching Words My Main File ?

Jun 9, 2009

I have been messing with diff and grep for 2 days now without result

I am trying to match a file consisting of words to many separate other wordfiles in a specific directory. one by one.

What i want the script to do is to report how many matching words my main file has with every file in the directory, each in turn

setup:

Each of em are plain text files with 1 word per line

Output should be something like:

SCRIPT REPORT:

View 8 Replies View Related

Programming :: Matching Two Tables Of Non-matching Sizes?

Mar 2, 2011

I have two table files with x (1st column) ,y (2nd column) coordinates and intensity (3rd column). I need to match these two tables and divide the intensities at the consecutive coordinates on the 3rd column. The problem is the size of the tables are not same and I want to ignore the lines if they are not in one of the other file.

Here is Table 1:

Code:
-7.500-30.00013.006
-7.500-22.50037.952
-7.500-15.00060.962
-7.500-7.50040.922
-7.5000.00014.348
code....

View 3 Replies View Related

Slackware :: Mkisofs -iso-level 1 Converts To Lower Case Instead Of Upper Case?

Oct 28, 2010

Kernel 2.6, Slackware 12.0
mkisofs 2.01

I do 'mkisofs -iso-level 1 -o image John Smith.txt'. Only an example. When I mount image, ls outputs john_smi.txt. So it has shorten to 8.3 and translated ' ' into '_'. This is in accordance with the manual, although it doesn't say the conversion will be done.

Quote:

-iso-level level
.........................
With all iso9660 levels from 1..3, all filenames are restricted to upper case letters, numbers and the underscore (_).
...........................

However, as it did not reject the file name, it should have converted it to all upper case, it seems to me. And -iso-level 2|3 does the same thing.

Code:

root@darkstar:~# mkisofs -iso-level 1 -o image John Smith.txt
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0

[code]....

View 5 Replies View Related

Ubuntu :: Bash - Delete First File Matching Regex?

Mar 27, 2011

In a bash shell script, I want to do something like this:

Code:
if [[ $(ls -ld /some/dir/foo_* | wc -l) -gt 4 ]]; then
rm -rf first_match_of /some/dir/foo_*

[code]....

View 6 Replies View Related

Ubuntu :: Matching And Returning A Part Of File Name On Bash?

Apr 25, 2011

If I have files named like this:

abc_one.c
egx_two.c
tsf_two.c

[code]...

View 9 Replies View Related

Ubuntu :: Error - Set A Valid User Name Consisting Of A Lower Case Letter Followed By Lower Case Letters And Numbers

Mar 12, 2010

I tried to add my wife , and when I put in a password for her, this error comes up."Please set a valid user name consisting of a lower case letter followed by lower case letters and numbers." I did all that and I still can't set a password for her.

View 3 Replies View Related

General :: File Matching Pattern On Command Line?

Sep 9, 2011

I've got files in a directory as follows:

1.png
1_thumb.png
1-1.png
1-1_thumb.png

[code]....

I want to list all the files that don't have a copy with the same filename with -1 somewhere in it. So, in the example above, the results would be 3.png.

NB: the file and its copy with "-1" in it will be the same filesize, if that helps.

View 2 Replies View Related

Programming :: Delete Line In File Matching String?

Jan 26, 2010

Quote:Originally Posted by topcatI would like to know how i can write a shell script to delete a line if a particular pattern exists?E.g. I have a text file with multiple lines. Say 1000s. in the following pattern.

username@email.com:149.0.3.4:1
username1@email.com:149.0.3.4:1
username1@email.net:149.0.3.4:1
username1@email.edu:149.0.3.4:1

If the patternusername@email.com exists then the line "username@email.com:149.0.3.4:1 should be deleted from the file.I have a very similar question but I need to delete one line in a file which matches one very precise instance of a string only. Let's assume I have a file composed of thousands of lines and let's call the file chap-secrets. Let's take the following sample entries:

Code:
#USERNAME SERVER PASSWORD IP
pp pptpd blahblah *

[code]....

View 7 Replies View Related

Ubuntu :: Only Search For Similar Case Sensitive File Names?

Jan 22, 2010

Anybody know of a way to search only for similar case sensitive files? By which I mean doing a wildcard search across a drive & the only results are like: Abc.txt abc.txt VID_001.avi Vid_001.AVI .. etc.

I've already tried searching the forums & google but the closest I've found is regarding files with increasing numbers (music_001.mp3, music_002.mp3, etc), which doesn't quite fit with my issue, as they would be seen as different files on a case insensitive OS.

View 2 Replies View Related

Programming :: Perl Switch Statement Throwing Error Like Bad Case Statement (invalid Case Value)?

Oct 6, 2010

I've written a simple perl code to learn switches in perl.My code is pasted below,

#!/usr/bin/perl
$opt = 1;
switch($opt) {

[code]...

View 3 Replies View Related

Fedora :: File Name Globbing No Longer Case Sensitive In Core 12?

Dec 31, 2009

Some of my files and directories were mysteriously disappearing and some of my shell scripts were failing after the upgrade to Fedora Core 12. After some debugging I found out that file name globbing is no longer case sensitive in Fedora Core 12, that is

rm -rf [a-z]*

now also trashes all files and directories starting with [A-Z], which explains the removed files and directories

and

ls [a-z]*

now also includes files and directories starting with [A-Z], which caused my shell scripts to fail.

Is this a bug or a 'feature'?

View 14 Replies View Related

Fedora Servers :: TFTP Case Insensitive To File Name Requested

Jun 19, 2010

I am downloading some files via tftp from the server (call it my server) and I need the server to be case insensitive to the file names requested. That is If I request "SoMe.TTL" and the actual file name is "some.ttl" it should send "some.ttl" back! Right now it is case sensitive and is a pain in the but because some windows clients upload files to that directory and the names can have any case. Furthermore, the file request mechanism must allow the user to input the required file name, hence the user can write using any case. Can the tftp-server solve cases by it's own? How about dnsmasq's internal tftp server? Ok, maybe I wasn't explicit above:
I need to make the fedora tftpd-server Case Insensitive!

View 2 Replies View Related

General :: Exit Bash Script - Add - Del - Edit User From Certain File Using Different CASE Variables

Mar 6, 2010

I have made a simple bash script through which i can add, del, edit user from certain file using different CASE variables. like
case
1. adduser
2. del user
3. edit user

Now i want to add a exit CASE like
1. adduser
2. del user
3. edit user
4. exit

Now i want to make a script such a way that, if user input is 4 then only script quit. I used with exit function also but it didn't work. if user press ENTER or other keys then also it quit the program.

View 6 Replies View Related

General :: Parse A File And Print Each Line That Ends With Matching Pattern (if The Next Line Is Blank)

Aug 2, 2010

I've written a script to parse a file and print each line that ends with matching pattern, if the next line is blank. The pattern lines are the result of md5sum $i|sed 's/path///g' so that only md5 and filename appear. Here's what I'm using.

Quote:
for fline in `sed -n '/.*.ext$/p' file1`
do
if [ "`sed -n -e '/'"$fline"'/ {n; p;}' file1`" == "" ]
then
echo ""$fline" has no info" >>file2
fi
done
[Code]....

View 4 Replies View Related

Programming :: Make A Folder For Each File In A Directory Then Move The File Into It

Nov 29, 2010

Initially I thought - use a for loop with ls in it:

Code:

However this causes lots of problems (folders have extensions, I have duplicate folders, the names with spaces create a folder for each element of the name).

The contents of the folder is basically movies (some with subtitles). Some of the names have things like (original) or CD1 CD2 in them.

View 15 Replies View Related

Programming :: Move The Index Of A File To Another Existing File?

Feb 8, 2011

i want to move the text of a file to another file,using sed command. how can i do it?

View 1 Replies View Related

Ubuntu :: How To Move A File Over Ssh To Server

Apr 4, 2010

how to move a file over ssh to server but I cant get it back via terminal

Code:

scp Downloads/test8 user@host:home/user/Documents

moves it to server now i need to transfer back, I know I can do it with nautilus but i wanna learn terminal, I have googled but cant find what i,m looking for

View 2 Replies View Related

Ubuntu Security :: Can't Move A File / What To Do?

Nov 6, 2010

OK I am trying to move a folder to a restricted area and it says I need root access, how can I get root access I been trying for ages and searching Google does not help because I am so new to Ubuntu I don't know what command lines mean or anything.

View 2 Replies View Related

Ubuntu :: Copy Or Move File From A .txt Source?

Apr 22, 2011

Im usign photorec to recover some files that i lost during a format to my hard drive.

The program works like a charm but put all the files on differents folders. i use the find command to put on a list the jpg files but how i use the cp or the mv command to move that files in the list to another folder?

View 4 Replies View Related

Ubuntu :: Cannot Move File To Trash / Solution For This?

May 13, 2011

This started happening last week. Whenever I try to delete a file that is not in my /home directory I get the message:

Cannot move file to trash, do you want to delete immediately.

I have found a couple threads in the forums about this issue, but it has always been associated with windows or samba shares.

This is happening on my computer, not on a shared folder or through samba. Its a little frustrating to say the least.

View 2 Replies View Related

Programming :: Move A File In C?

Apr 17, 2011

I'm trying to move a file in C, but I guess there is a simple method to do this in libc!

Somebody knows how can I do this on libc, or using some "default" method?

View 9 Replies View Related

Ubuntu :: Move This Driver File To The Model Folder?

Apr 29, 2011

I am trying to post a driver in ..../cups/model folder but it says"access denied....could not write to ....cups/model.how do i move this driver file to the model folder

View 1 Replies View Related

General :: Move Ssh Known_hosts File?

Oct 19, 2010

I was wondering if it's possible to move the known_hosts file from ~/.ssh/known_hosts to ~/somewhere/.ssh/known_hosts . I have a server running Plesk and the user home directories do not have write permissions (they do have write permissions within the subfolders, however).

I was able to move the authorized_keys file by editing sshd_config AuthorizedKeysFile , but when I try to log in without password, I'm still prompted every time if I want to add the host to list of known hosts, and it fails to save every time since it cannot write to known_hosts. Thus I am still unable to automate some processes. I'd like known_hosts to be located in the same location as my authorized_keys, which does have correct permissions for users.

View 1 Replies View Related

Fedora :: Cannot Move File To Trash

Mar 6, 2010

I'm trying to move certain files to Trash using File Browser. I continually get this message:"Cannot move file to trash, do you want to delete immediately?"I am logged in under my user name; I (my user name) am the owner of these files; ALL permissions are on (rwx for owner, group, and other); and Trash is empty. Still I get this message.

View 4 Replies View Related

General :: Move Old File To Other Directory?

Feb 2, 2010

I have a directory , there are many files created in it , I want to use the command to move the files which elder than 30 days and gzip it and then move it to /tmp , and then remove those files , I tried use below command but not work.

find ~path -type f -mtime 30 -exec tar -zcvf - {} --remove-files > /tmp/oldfile.tgz ;

View 1 Replies View Related

General :: Move One Big File To A New Serve?

Mar 5, 2011

I want to move a big file (92gb tar) from a server to a new one

What's the best way to do this? I did try scp username@<xxx.xxx.xxx.101>:</home/xx...les/ani.tar.gz>

Which I found on the web somewhere but it did not work for me

View 3 Replies View Related

Programming :: Move The End Of File Indicator?

Jun 4, 2010

Is there a valid way, or trick to move the EOF indicator of a file? For example the file contains the data:

Code:
I am asking question.
0123456789
This is the example content of the file.
End is after the period.

I want to move the EOF after the number 9 so that when I read the file it will now contain:

Code:
I am asking question.
0123456789
Is this possible? Language to use is C.

View 4 Replies View Related

Ubuntu :: Cannot Move Channel Config File - Permission Denied

Feb 19, 2010

I made a new channels.conf file, but when I try to move it to /usr/local/etc it says permission denied, I need the config to watch digi-tv on ubuntu movie player.

View 3 Replies View Related

Ubuntu :: Move/copy A File To A Shared Windows Folder?

Mar 23, 2010

I am able to view my windows network from my UBUNTU desktop after being prompted for a username and password to the windows network. No problem. But how can I accomplish this from the command prompt?

Here is my windows directory; smb://corpserver/d$/Data

And here is what I am trying to accomplish;

Code:
mv /var/lib/mysql/RSecuredData.csv smb://corpserver/d$/Data/Common/Secured%20R%20Reports/$(date +%Y%m%d)_RSecuredData.csv

Basically taking a csv file and moving it from mysql directory on my Ubuntu machine to a network folder on my windows server. (Windows Server 2003)

When I try that command from the command prompt I recieve;

Code:
mv: cannot move `/var/lib/mysql/RepoSecuredData.csv' to `smb://corpserver/d$/Data/Common/Secured%20Repo%20Reports/20100323_RepoSecuredData.csv': No such file or directory

View 9 Replies View Related







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