General :: Can Get Version Number Of Tar Used To Create Specific Tar File?

May 19, 2010

I need to know the version number of tar used to create a specific tar file. How can I do that?

View 1 Replies


ADVERTISEMENT

General :: Create A File In The Current Directory Named '5' With The Number '2'?

Aug 24, 2010

Code:
$ echo 2 * 3 > 5 is a valid inequality. This will create a file in the current directory named '5' with the number '2' in it, the names of all the files in the current directory, followed by the number '3' and 'is a valid inequality.'

What I do not understand is why 'is a valid inequality' gets written to this file. I thought it would write '2', all the file names in the current directory, then '3' into the file called '5'. Why does the 'is a valid inequality.' get written to the file also?

View 3 Replies View Related

Programming :: Search A Bunch Of Files In A Specific Folder For A Specific Number?

Jul 24, 2010

I need to search a bunch of files in a specific folder for a specific number and add all the numbers together to a total sum. I use Rsync everyday, everytime I run rsync i get a logfile (rsync output) witch contains the textstring "Total bytes sent: xxxxxx".

The "xxxxx" can vary in lenght. I need to extract the "xxxxxx" from each file and add the numbers together to a total size over a week or a month. Is this possible? And I wish to only use bash. One way of doing stuff at a time my friends .

View 5 Replies View Related

Ubuntu :: Create A Script To Count The Number Of Lines From A Text File?

Dec 17, 2010

I need to create a script to count the number of lines from a text file . The output must be put on another text file (no_lines.txt) and in this file i need to generate from the script this output :"File $FILE has $NO_LINES lines ".

View 3 Replies View Related

Server :: Create A File From Two Files With Specific Search Conditions?

May 5, 2010

I need to create a report ,

The data is spread across two files in below format,

File 1
=========
<Class Name1>
Ph: 001
Place: place001
</class>

[Code]....

View 4 Replies View Related

General :: Find The SVGA Version Number?

Mar 30, 2010

I can track that my CentOS 5 ships with SVGA driver through:

cat /var/log/Xorg.0.log | grep SVGA

But how can I find the SVGA Version number?

View 1 Replies View Related

General :: Find The TCSH Shell And Gzip Version Number?

Apr 7, 2010

I need to find TCSH shell and gzip version number by running a acript on several boxes through ssh. How can i do that? I made a script for tcsh but it is not working by ssh , it only works on my box . I dont know from where to find the gzip version info.

View 5 Replies View Related

General :: VirtualBox: Install A Specific Version Of Ubuntu?

Jun 6, 2011

I'm using VirtualBox on MacOS and I need to install version 10.0.4 of Ubuntu.The setup for VirtualBox only allows you to specify Linux > Ubuntu (64-bit).How can I install a particular version? I've been told that you can download it as a disk image and install it in VirtualBox somehow: can anyone point me at more details?

View 2 Replies View Related

General :: Create Files For Specific Output?

Mar 10, 2011

I would like to create a bash script that takes the following text and split in different files. The output is:

Code:
JOB ID: 1
JOB NAME: Test1
01012010 Message: Success1
01012010 Message: Success2

[Code]....

View 7 Replies View Related

Programming :: Create File Listing In C++ That Will Generate Line Number On Every Line Of Code

Apr 11, 2010

I have a project due for my Intro to C++ class and we are suppose to generate a file listing that will take an input of a C++ source code with .cpp extension and make a copy of it with a .lst extention that will have a line number preceding each and every line.

View 12 Replies View Related

General :: Create Multi Bootable (with Menu) Cd / Dvd That Contains Number Of Live Cds?

Mar 4, 2010

How can I create a multi bootable (with menu) cd/dvd that contains a number of live cds? Is there any "easy" way of doing this? Isolinux is the way to go I guess, but is there any tool available for this?

View 2 Replies View Related

General :: Create Unix User With Specific Requirements?

Aug 1, 2011

It should not have any /home/. It only can access a folder and that folder is home default for this account.

Details about my usage: We have a simple folder which contains demo code and we want to create a user to read this folder only

View 2 Replies View Related

General :: How To Delete A Line At Specific Line Number

Jun 15, 2010

I m writing a script to delete a line at particular location.

But i m unable to use variable for specifying line number.

For example.

Code:

works fine and deletes 7th line from my file

But

Code:

gives following error.

Code:

View 7 Replies View Related

Server :: Get FTP To Use A Specific Port Number?

Mar 17, 2011

How do I get FTP to use a specific port number? .. I read the manual but cannot work this one out.

View 2 Replies View Related

Debian :: SSH AllowGroups Specific To Port Number?

Sep 17, 2010

Is it possible to setup SSH Daemon to listen on multiple ports and only accept specific groups to a given port? In the past I've created a second SSH Daemon by copying the config file and /etc/init.d/ daemon then configuring each port separately / rules however if I was able to maintain just the one Daemon that would be optimal. Is this possible?

View 1 Replies View Related

General :: Script To Insert Number Of Lines In A File To The Start Of The File?

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

General :: Find Folders With ONLY One Specific File In And Delete File And Folde

Oct 21, 2009

Many folders within a subdirectory some of which have lots of data in and some of which have only one specific file called produkt.fil inside.I need a command to find and delete those folders that contain ONLY the file produkt.fil - if other files exist (doesnt matter what they are) then they should be left alone. Note: produkt.fil exists in all of the folders always.

View 5 Replies View Related

Programming :: Bind A PF_PACKET Socket To A Specific Port Number?

Sep 26, 2010

I am trying to create a socket to listen for a bootp response so I am using a PF_PACKET socket so that I get the response based on my mac. My problem is that I don't want to hear all traffic (as I do now) so would like to use a specific port number and bind to it.

View 1 Replies View Related

General :: Rename A File By Replacing Specific Letters In The File?

May 11, 2010

I used a script that renamed my file eg 'echo webutil.olb | tr [A-Z] [a-z]' i wanted to rename it back to webutil.olb. How do i do this for many other files that i have

View 3 Replies View Related

General :: How To Create A Topology Map In Opennms Version

Dec 30, 2010

How to create a topology map in opennms version 1.8.7. I am waiting for your affirmative response.

View 2 Replies View Related

Programming :: Bash Script To Count Number Of Lines With A Specific Property7?

Aug 11, 2010

I would like to parse an input file in which there are two columns per each row. We want to see how many lines are duplicated where we define duplicate to be having the same second field and different first field. For instance if the input file looks like the following:

79874 13131
79873 12309
79820 13131

[code]...

View 10 Replies View Related

General :: Customized And Create (CD/DVD) Knoppix Image From 6.2 Version?

Nov 17, 2010

I want customized image of knoppix 6.2 version. Please let me know how to customize and create CD/DVD knoppix image.

View 1 Replies View Related

General :: Max Number From The Name Of A File?

Mar 24, 2010

I need to get the max number from the name of a file

Formant of the file name:
[a-zA-Z]*_[0-9][0-9]_[A-Z][A-Z].log
Delimiter as underscore '_'

[code]....

known part in the above file name will be GA.log A give directory may or may not contain files in the above format or may contain file other then the above format if so then ignore it.

Eg:-

1) Directory=/tmp/log having below listed files

ant_01_EG.log ant_02_GA.log ant_04_EG.log cvs_01_EG.log cvs_02_GA.log cvs_04_EG.log master_01_GA.log master_03_EG.log master_04_GA.log

[code]....

output=> 06

2) Directory=/tmp/log no files

cmd=> ls *[0-9][0-9]_GA.log 2> /dev/null | awk -F_ '{ print $2}' | sort -nr | head -n1 | awk 'BEGIN { if ($1 >0 ) x=0; else x=1 } END {printf "%02.0f
", $1+1}'

output=> 01

if there are no files the output should be 01 and if file(s) found the output should be next highest number+1, In the above example it is 06 My cmd is bit lenghty. reduce my cmd and it should be in one line.

View 6 Replies View Related

General :: Searching For Number Within A File?

Nov 9, 2010

I'm currently trying to design a small, simple enough shell program for area codes. I have a list of area codes in a database, and I am trying to write a program that will have a user input an area code, and then have the program print out information that immediately follows that area code in my database. I assume I need to use a find or locate command, but I'm not sure if I should be searching for a string or the number itself. The number could possibly occur at some other point in the file, though the way I have the file set up it only occurs once at the newline.

what function I should use and how I should go about it? As is I only have the absolute bare-bones beginning of having an echo for the prompt to input an area-code, and the read once it's input. Without the find I'm not sure how much farther I can get. Also, would it make it easier if I added some character such as a ! to the end of the number at the newline to make it easier to search for? With a macro that would be easy enough to do.

View 1 Replies View Related

General :: Find Inode Of A Particular File Using Its Number?

Nov 16, 2010

Can we find the inode of a particular file using its inode number?

The reason is i want to know how many blocks are occupied by specific file.

if we consider block size of 1K.
if the file size is of 100 bytes. In such a case, when the file is
stored on disk, the file will occupy 100 bytes or 1K (since we have
choosen block size to be 1K) ?

View 6 Replies View Related

General :: Comparing A File Size To A Given Number?

Jul 26, 2011

I'm trying to write a script that takes two arguments, the first argument is a number, and the second argument is a filename. The shell script should indicate if the file's size is BIGGER or SMALLER the number provided. this is what i have sofar, am i on the write track, i'm hoping its just a problem with my if command

if [ $1 -h $2 ]
then
echo "$1 is bigger than $2"
else

[code]....

View 2 Replies View Related

General :: How To Grep Negative Number In File?

Mar 4, 2010

I wanted to grep the line in a file starts with -1.000000e+00.

Tried grep "-1.000000e+00" *, got error "grep: invalid option --".
Neither of the following works:
grep "-1.000000e00" *
grep "1.000000e00" *

How do I grep a negative number with scientific notation?

View 3 Replies View Related

General :: Isolate A Number From A Text File Using Sed?

Mar 27, 2010

I'm trying to isolate a number from a text file using sed. The text file looks like this:

-GARBAGE-GARBAGE-GARBAGE- Number of frames: 183933 frames Codec -GARBAGE-GARBAGE-GARBAGE-

I tried the following:

Code:
sed "s/^.*Number of frames: //g; s/ frames Codec.*$//g" "info.txt" > "frames.txt"
Strangely, it only seems to be stripping off the end, but not the beginning, like so:
-GARBAGE-GARBAGE-GARBAGE- Number of frames: 183933

I'm obviously not using the command correctly, so what am I doing wrong?

View 8 Replies View Related

General :: Show The Number Of File On Folder?

Oct 21, 2010

My folder have some files and I want to show the number of files on folder at "Total file on folder: " Ex: Monday folder have six files and it will show "Total file on folder : 6" when I run a script. This is my code :

#!/bin/sh
if [ -d /home/kenzo/Monday/ ] && {
echo "Monday"
ls -l /home/kenzo/Monday/

[code].....

View 2 Replies View Related

General :: Print The Number Of Characters In The File?

Apr 6, 2010

# echo "foobar" > /tmp/word
# cat /tmp/word | wc -m
7

I want to print the number of characters in the file. Why does it output 7? Am I missing something obvious?

manpage:
-m, --chars
print the character counts

View 3 Replies View Related







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