General :: Perl Script For Latest File From Folder

Jul 31, 2009

i want to get the latest file name from a directory, how can i do with perl script. In other words, how to sort the contents of a folder on the basis of time and capture the latest file using perl script,

View 6 Replies


ADVERTISEMENT

General :: Does The Latest Ubuntu Download (.iso File) Contain Latest Fixes

Aug 5, 2011

If I go to the website and download the ISO file is it the exact same one that was released in April or will it contain the latest patches (e.g. security fixes, etc) that have been release since then? If it doesn't I suppose I'll have to download the entire ISO file, install the OS, and then have another couple hundred MB to download which is not what I'd prefer.

View 2 Replies View Related

General :: Copying Latest 10 Files From One Folder To Another?

Nov 19, 2010

i want to copy the latest 10 files from one holder to another. All the files start with the number 2 and this is what i have so far:

lt -lt 2* | head -10

So i want to copy that output of 10 files to another folder

View 5 Replies View Related

General :: Finding A Recursive Shell Or Perl Script To Delete Files With The Same Name As The Parent Folder?

Jun 29, 2010

is there a recursive shell or Perl script to delete files with the same name as the parent folder? i wish to include the starting folder name as argument to the script.

View 2 Replies View Related

Software :: Which Latest Perl Is Suitable For Redhat AS4 I386 System?

Jan 28, 2010

Which latest perl is suitable for Redhat AS4 i386 system?where do I get it from?

View 2 Replies View Related

General :: File Type Check In Perl?

Oct 12, 2010

I am witing a file upload program in perl where i need to upload a wav or a gsm file and save it as a gsm file.How can i make sure that the uploaded file is a wav or a gsm sound file and not an executable malicious script or something.

View 2 Replies View Related

General :: Append # Begining File In Perl

Nov 28, 2010

Can you please let me know how can i append # in the begining of each line Based on a a search string lile /^8282##8282/gc

View 1 Replies View Related

General :: Extracting Latest Tar File From The List?

Jan 25, 2010

I have a bunch of tar files in a folder with the name in 'file_name.MMDDYYYY.HH.mm.SS.tar' format. I need to write a shell script that picks latest and greatest of the above tar files and extracts it to a particular folder

View 1 Replies View Related

Programming :: Add Folder To Perl Path?

Jun 8, 2010

I'm the server guy which is why I don't know this, but were staging a new webserver and we use some custom perl scripts and as were moving the site over for testing, apache is blowing a perl error;Can't locate web.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/mcp/htdocs/cgi-bin/newgraph.gif line 11.,Now I can copy that file local, but there are a bunch of things, so the question is how do you globally add a folder to the perl search path

View 1 Replies View Related

General :: Tail The Latest Log File In One Command Line?

Feb 1, 2010

I want to tail the latest log file in one command line. I dont know what command/option to use for the same.

View 5 Replies View Related

General :: Perl Script To Replace The Number From Text File?

Jun 21, 2010

on creating a new perl script which replace IP address from the text file. eg. If in a file, we found any word like 11.222.333.44 then it has to be replaced to XX.XXX.333.44

View 8 Replies View Related

General :: Processing Script That Find Latest Version Of Each File

Mar 5, 2011

I want to write a script. I have the basic form working... but I would like to add some advanced features. I have a list of .zip files that have a version number in the filename (i.e. sudoku-134.zip, sudoku-176.zip, sudoku-203.zip, etc). I would like to have a script that will find the latest version of each game, and unzip it. I want the next to latest version left untouched. But anything older, I would like the unzipped folder deleted (But leave the .zip file)

Here's what I have so far:
Code:
#!/bin/bash
cd /var/www/vhosts/server.com/httpsdocs/games/$1
for file in `ls *.zip`; do
if [ -d ${file%.*} ]; then
echo
else
mkdir ${file%.*}
cd ${file%.*}
unzip ../$file > /dev/null
cd ..
echo 'date' $file >> /var/www/vhosts/games4roku.com/private/$1.log
fi
done
I can call the script with "game-unzip public" to unzip all the public games.

Here's my files:
Code:
sudoku-134.zip
sudoku-134/
sudoku-176.zip
sudoku-176/
When I add the latest version, sudoku-203.zip, I want it to unzip it to ./sudoku-203/ and rm -rf sudoku-134

View 2 Replies View Related

General :: Where To Download Latest Release Open Office DVD .iso File

Sep 4, 2009

About a couple of days ago I'm sure I saw that Open Office was offering a DVD file download of their latest version. It was including versions for Win. Mac and Linux all on the one DVD. Now, after buying a DVD burner for my 'puter, I have been unable to find that information again.

View 4 Replies View Related

Programming :: Simultaneously Execute All Perl Scripts Within A Folder?

Apr 27, 2011

Is it possible to simultaneously execute all perl scripts within a folder? How?

View 1 Replies View Related

General :: File Privileges - Check And Set Who Can View Or Open A Given Folder Or File?

Jul 30, 2010

How can I check and set who can view or open a given folder or file?

View 1 Replies View Related

Red Hat / Fedora :: Convert Plain Text File To Html File Without Using Perl?

Jun 9, 2010

I am looking for some source package which will convert plain text file to html file without using perl.

I mainly need to do this on an ARM platform, so if I get sources I can cross compile it.

View 5 Replies View Related

Programming :: Perl Find File And Then Replace String In File

Jul 28, 2009

I have script that I'm working on that updates a username in all the files that are called blah.inc for my framework. since i host a bunch of these web apps i need to do it to all of them. so I need to figure out how to update these files automagically with out me watching it to call vim every time. heres what I have so far

Code:

This finds the files but now i need to figure out how to do s/bob/fred/g on those files.

View 5 Replies View Related

Programming :: Split A File To Multiple File Using Awk Or Perl?

Feb 27, 2011

I have a single file that contain multi-text something likes this:

Quote:

No. Time Source Destination Protocol Info
185 27712.068199 192.168.18.23 192.168.18.191 SMTP S: 250 2.1.5 Ok
No. Time Source Destination Protocol Info
186 27715.068293 192.168.0.50 192.168.5.2 TCP suncacao-jmxmp > 44693 [ACK] Seq=1 Ack=1 Win=64807 Len=1380

[Code].....

View 14 Replies View Related

Ubuntu :: Kde 4.5 - Move A File Or Folder Into Another Folder, All The Icons Arrange Back To The Left Side

Sep 14, 2010

When I position icons on the desktop in specific places, then I choose to move a file or folder into another folder, all the icons arrange back to the left side. This happened in an earlier version of KDE 4.x, disappeared the next version, and reappeared. how to keep this from happening. It makes using the desktop a pain in the you know what.

View 2 Replies View Related

Ubuntu :: Drag File/Folder To Taskbar Button Creates Launcher, Not Bring Folder To Foreground?

May 20, 2011

After upgrading to 11.04, I noticed something strange, being that when I want to drag a file or folder from one Nautilus folder window to another which is not visible, I can no longer hold the item over said folder's taskbar button and wait for it to appear. It just shows the + for copy, and when I let go (which I have no choice but to eventually do), it creates a launcher to that item (I assume it's doing that, and not actually copying there, but the + has me unsure).

I've looked in Nautilus's preferences to see if this is some new behaviour that I can revert back to, but could find nothing there.

I'm of course using the Classic desktop with bottom panel being the taskbar. If you know how I can rectify this, please let me know, as the times I would want to create a file or folder launcher without the usual hassle would be rare, but I am constantly dragging stuff from one folder to another, and it would be a real pain to have to line up source and destination folders each time.

View 4 Replies View Related

Debian :: Create Folder From Filename And Move File Into Folder

Feb 13, 2011

this is posable but am trying to do this "Create folder from a filename and move the file into the folder" i have 500000+ file's i need to do with is there a easy way?I really don't want to download them all make/move them with filemonkey just to re-upload them

View 2 Replies View Related

Software :: Build File Or Folder Missing In Modules Folder

Apr 14, 2009

i am trying to install a driver for my belkin wireless usb adapter but when i type make it says cannot find lib/modules/<debian version>/build so it does not configure the sources.

View 1 Replies View Related

General :: Insert A Folder Into A ZIP File?

Aug 11, 2011

I'm a newbie on Linux and had to do something like this with the zip command:

My folder structure inside a zip file abc.zip is code...

It would move into abc.zip as folder3/textfile.txt (the hierarchy preserved)
Also used a -j switch (help said it junked the path info and it did but) - it would move only into abc.zip and sit at the same level as folder1 and folder2 instead of replacing the textfile.txt within abc.zip/folder1

My question is - I want to replace the abc.zip/folder1/textfile.txt with the one inside seconddir/folder3/textfile.txt.

How do I achieve this via the command line interface?

View 3 Replies View Related

Software :: Copy A File Or Folder In Some System Folder?

Dec 1, 2010

When i want copy a file or folder in some system folder like sbin,Etc.show me error about privilage but when I'm in console i use su command for become admin and i can copy my file or folder.in other operation system like windows user can copy anything,i want know for direct copy my folder in linux without console what should i do? i must join my user name in root group?

View 4 Replies View Related

General :: Use Of Placing Any File In /etc/cron.d Folder?

Mar 23, 2009

what is the use of placing any file in /etc/cron.d folder , is there any use of it ? will crond daemon run the files automatically which are placed in /etc/cron.d daemon ?

View 1 Replies View Related

General :: Get File / Folder Size With SSH On System?

Jun 22, 2010

I am using SSH to connect to a CentOS server and I want to get the file in mb of some files and folders, how can I do it?

View 2 Replies View Related

General :: Create Folder Name From The Text File?

Jun 23, 2010

1. I need guide on how to create a folder name from the text file with .txt format.

2. First, I call the function of reading the directory.

3. Then, I dont know how to do.

4. Finally, I close the directory

This is my source code in perl

## read text.txt file ##
open F, "from/$directory/text.txt";
read F, $buf, 9999;
close F;[/size]

This source code is used to print the folder with date format like "ddmm" d stands for day and m stands for month

if ($command =~ s/-O "(.*)"/-O "$websites/$month/$file"/)

Instead, I want to have the name from text.txt to be folder name

View 4 Replies View Related

General :: Determine The Size Of Each File In A Folder?

Nov 30, 2010

i have a folder with 10 files and i would like to determine the size of each file. i was trying the command

Code:

du -sh foldername

but i receive the total size .

View 5 Replies View Related

General :: Deleted File / Folder Recovery

Feb 19, 2011

I have just accidentally deleted some files and a folder.Is there anyway I can recover them.

View 1 Replies View Related

General :: Install Tar.gz File In Download Folder?

Aug 24, 2010

I have a voip program downloaded. It is in tar.gz format. It is in my home/download folder. How to install that?

View 6 Replies View Related







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