Ubuntu :: Find Those File Does Not Start With Numbers?
Jan 4, 2011
this command show that files that start with numbers
Code:
ll [0-9]*
how can i find those file does not start with numbers?? (files can started by every character except / (slash))
View 4 Replies
ADVERTISEMENT
May 13, 2010
I want wondering if I can ls files that start with numbers only in a folder.
Suppose:
001.txt
302.txt
[code]....
View 6 Replies
View Related
Jan 11, 2010
does anyone know of a good site/book/guide to learn about linux web server administration?
and also how do you find the your own nameserver numbers? would that just be the IP of my web server?networking isn't my forte, but i do intend to learn with this project.
View 5 Replies
View Related
Mar 1, 2011
I am trying find files in a directory that contain numbers. I have tried ls /etc *[0-9]* but that doesn't work. If I cd to /etc and run ls *[0-9]* it almost works but it also includes results from within files. My last thought was to try: find /etc [0-9] -type f but this does not work either. My second problem is that I am trying to get list of files in a directory that were changed less than 10 hours ago, using grep, while leaving out directories. I am completely stuck with the second problem.
View 8 Replies
View Related
Nov 20, 2010
I have a text file with 4 columns and 18 rows. All are integers. I wish to find the average of first 12 numbers in the third column using 'awk'.
View 8 Replies
View Related
Jul 25, 2011
I have recently switched to using LXDE on my PC and I am on the whole pretty pleased with it. However,PCMan is giving me a really odd problem. Some of the files/folders are being displayed in the wrong order where they contain numbers. They are being ordered by their first digit not the whole number.
[Code]...
View 5 Replies
View Related
Nov 10, 2010
am trying to find a proper regex to match the two numbers in the following log entry.
Code:
15:08:16.142 INF Found 64468
15:08:16.142 ERR [Uniform test code=64469]
Basically the pattern I'm looking for will match the two different numbers spanned across two lines.Thought I need to use multi-line mode as follow but this doesn't match on [URL]...
Code:
/^($[0-9]{5}
[0-9]{5})$/m;
View 6 Replies
View Related
Feb 3, 2011
There is a very conspicuous inaccuracy in the output of df. I should mention, that it was noticed to to a sudden change in the amount of space that was left on the backup partition. The df -h command produces the following output.
[Code]...
View 3 Replies
View Related
Apr 19, 2011
I am working on a project but it consist of a large amount of numbers. I have tried using OpenOffice to produce this list of numbers but it keeps crashing when I reach a certain point. So I was looking for some help. I need to see if someone could either help me with using a script or program to export these numbers into a .txt file or if someone could just make the list for me.
I am looking for a text file that will have the numbers 1000000000 to 9999999999 in order. I understand this is a large amount of numbers but this something I don't have the time to just do manually and each time I try to do it with OpenOffice it crashes around 1009000001. Oh and I need the text file to look like this:
1000000000
1000000001
1000000002
1000000003
View 2 Replies
View Related
Dec 22, 2010
I am trying to extract 2 numbers from a same file and my goal is to print them both in another file, on the same line, separated with a space. I have to do that for 20 files and I would like to have therefore 20 lines like this in the output file. It would look like this :
Quote:
number1_file1 number2_file1
number1_file2 number2_file2
...
...
number_1_file20 number2_file20
So far, I did only extract one number and got an output file like this :
Quote:
number1_file1
number1_file2
...
...
number1_file20
And I did this by running a bash script with the following content :
Code:
#!/bin/bash
ls execution$1$2*.* | while read filename
do
cat $filename | grep -e "Total aborts:" | cut -d " " -f3 >> abort$1$2.dat
done
$1 and $2 are just strings to identify the different files I want to consider in this loop. This script works well to extract a number which is the 3rd field of a line starting with "Total aborts:".Now, how could I change this script to do what I mentioned above (i.e. extracting two numbers from two different lines) ? The second number is the 3rd field of a line starting with "Total throughput:"
View 7 Replies
View Related
Nov 28, 2010
I have thousands files in which there are numbers and a dash followed by file name (which are different from each other), but have the same suffix. I would like to remove all the numbers and dash that precedes the file names.
View 1 Replies
View Related
Feb 23, 2011
Im using an if statement in the bin ash shell and it isnt working.
Code: if (( 5000 > $available_blocks )) then echo "WARNING Disk space low, "$pct_used" is used" fi
I don't think its a problem with the if. When i use that code it creates a file with name of the value $available_blocks instead of using the '>' sign for comparing the 2 numbers.
View 6 Replies
View Related
Feb 11, 2011
I'd like to use screen to execute a file with a certain session name instead of just numbers... or at least have a more permanent name, I'd like to be able to use it all in one command though. So I can put it into a script.Also: is there a way I can remove or change what comes up at the debian login screen so instead of debain 5.0 I can make it say something else? Also when I login the message that comes up is a little annoying, is there a way I could remove or change that too?
View 7 Replies
View Related
Sep 6, 2010
Is there a command to return a recursive listing of sub-directories and the number of files in them? I have found plenty of ways to give me the total number of files in a directory structure, but none that gives a list of the sub-directories with the number of files in them. "du" gives me a listing of directories with their sizes, but I couldn't find an option (or any other way) to give me the number of files as well. Ideally, I'd like to get list with "Size" "Files" "Dir name" - And the order of the columns doesn't matter. Is there a "simple" command line solution or do I need a shell script for that?
View 5 Replies
View Related
Apr 11, 2010
I am trying to find a way to replace a set of sequential numbers in a file with a different sequence using sed. This might be done easier using awk or some sort of bash script, but it seems to me there must be a way to do this easily with sed. Basically, what I am editing is a Cisco switch config. I want to change the sequence of ports to a different numbered sequence. Here is an example of what I am trying to do.I want to change for example, the file:
Code:
cat testfile
interface FastEthernet0/1
[code]...
View 6 Replies
View Related
May 13, 2010
I ran into it while google Segmentation Fault. I'm writing a simple C program that reads a file that counts each line and numbers it then writes to a file called sdout. I copyed my program mostly from the text book but im still having problems. Heres my code:
#include <stdio.h>
#include <stdlib.h>
void new_line(FILE *, FILE *);
int main(char *argv)
[Code]....
View 14 Replies
View Related
Apr 4, 2011
am writing a small search program for my class. I have decided to use indexing for my program. Ive researched online about indexing and how search engines do it. If im gonno do that I need to create inverted files to associate files to numbers ( numbers being the index of my paths ) . Now I was wondering what would be the best way to create an inverted file ? I was going to create sql tables using mysql api in C but then again there is no array data type or vectors to store few numbers in a single column in mysql and it is not advised to use Enum or SET
View 14 Replies
View Related
May 26, 2010
I'm writing a bash script where I read a text file (containing a column of numbers) and store each line in an array. There seem to be some problems with the whole thing however, but only for some files and not others. Here's what I do:
Code:
#!/bin/bash
file=time_notOk.txt ### The file with a column of numbers
i=0 ### Array counter
### Read the file
[Code]....
View 3 Replies
View Related
Nov 4, 2010
I have to read a couple of numbers from a random.txt file. In this .txt file there are random numbers. They are separated by a space. Example if you opened test.txt:
test.txt :1 6 1 3 6 8 10 2 4
I would like to read those numbers using CAT and store them into an array:
numlen=${#num[*]} - (must be like this because it is a part of a larger program)
View 5 Replies
View Related
Aug 3, 2010
am new to linux and trying to find a file in sub directories using find command as:find .-name *.jpg -type fBut I am unable to get the result as find command is not permitted by the server administrator.Is there any way to find files without using find command.
View 14 Replies
View Related
Jun 27, 2010
I thought it was in the System>administration menu somewhere, but I just can't see it. What is it called, and where do I find it please?
View 9 Replies
View Related
Aug 15, 2010
In Ubuntu 10.04 I installed VMware workstation 7.1 to run a VM - everytime I need to run it though, Workstation doesn't find a file (VMmon) and I need to run in terminal this command: sudo /etc/init.d/vmware start
How can I add this in the boot file so it starts automatically and I do not have to run it manually -
View 1 Replies
View Related
Nov 17, 2010
As I know, lly includes a control file. Takelibfreetype6_2.3.9-5ubuntu0.4_i386.deb for example, its control file includes the following content:
Package: libfreetype6
Source: freetype
Version: 2.3.9-5ubuntu0.4
[code]...
View 2 Replies
View Related
Oct 30, 2010
No menu, can't find a keyboard combination to start terminal. Ubuntu 10.10 32 bit. Do I have to re-install?
View 4 Replies
View Related
Feb 28, 2010
How to find filename and file path from a string
View 7 Replies
View Related
Sep 17, 2009
I'm looking for a way to insert the number of lines in a file to the start of the aformentioned file. This should be simple but as I am not used to scripts in Linux, I am finding it tough going. I can find the number of lines in a file easily enough via
filesize=$(awk 'END {print NR}' $1)
but as for inserting this into the first line, i'm failing to do so. I've tried some of the other approaches on these forums but none so far have been able to do so.
I've tried:
sed '1i$filesize' $1
but sed i requires a string, not a variable so no go I've also tried:
mv "$1" "${1}.bak" 2>/dev/null || touch "${1}.bak"
cat $filesize "${1}.bak" >"$1"
but again with no luck as cat seems to need an input stream Just to recap, i want to insert a line at the start of a given file that holds the number of lines the original file has.
ie the file:
a
b
c
d
e
should become:
5
a
b
c
[code].....
View 3 Replies
View Related
May 18, 2011
shell scripting in Fedora14I want a script"Find in curent folder for files, and it copy first file he find with name gived by user, if name already exist then echo error message and finish"command usage " bash scriptname copyASname"
smthing like Code: #!/bin/bash
for files in /home/user/*
do
[code]....
View 1 Replies
View Related
May 5, 2010
I noticed that every time I logged in my network icon always moved to the middle of the top panel. Getting tired of moving it back every time I decided to remove the panel and start from scratch. But I cannot find the me menu or the shutdown/logoff/switch user menu. So I cannot rebuild the panel the way it was. How can I find these items?
View 8 Replies
View Related
Jun 18, 2010
How to find Start and end sector of partition with sudo-command?
View 2 Replies
View Related
Sep 30, 2010
I want to start learning GUI bash scripting but I can't find the right tutorial. I'm interesting at creating menus like ex. IPTRAF or MC (midnight commander) but all i find is tutorials for KDE & GNOME. The idea is that I want to create programs that don't need X sessions.
View 2 Replies
View Related