Programming :: Script To Check If Compress Folder Is Corrupt Or Not?

Feb 14, 2011

I am trying to compress a folder and the contents within, while keeping the permissions the same. I then need to check if the compress file is corrupt or not. Base on that result I need to transfer the file.

cd /home/ops/Desktop/temp
tar cvzfp backup-"$(date +%d-%b-%y)".tar.gz /home/ops/Desktop/dir1
gunzip -tl backup-"$(date +%d-%b-%y)".tar.gz

View 2 Replies


ADVERTISEMENT

Fedora :: Compress A Folder By Right Clicking And Selecting Compress - No Such File Or Directory

Feb 18, 2011

I am trying to compress a folder by right clicking and selecting Compress...I get the following error:

An error occurred while adding files to the archive.No such file or directory

I want the folder and its content to be compressed to a .ZIP file which is natively accessible by Windows.

View 6 Replies View Related

Ubuntu :: Check The File's Compress Method?

Feb 1, 2011

I have a compressed text file. The method of compress is unknown.I can see the file contents by using Midnight Commander without a problem but I would like to view the file just with cat. So I am trying to uncompress the file with unzip or gunzip but it does not work.How to check the method the file is compressed with? Is any way to find it with Midnight Commander?

View 4 Replies View Related

Programming :: Check Folder For Specific Files Than Move Script?

Nov 16, 2010

I have a script that checks a folder for zip files than moves them to a different folder. I want to check every 5 maybe 10 seconds and since cron is setup to run at least a 1 minute increment I'm not sure how to do that time check as probably a loop within the script. One other thing is once the time check is in the script how would a cron job be setup to run this script? Once the script is running cron doesn't need to run it again, is there a feature to check if it's running and if it's not then run it?

find /export/xxxshare -name "*.zip" -exec mv {} /export/store ;

View 3 Replies View Related

General :: Compress .gz Folder With All Contents Inside Sub-folders / Images?

Oct 5, 2010

How can i compress to .gz my folder public_html:

media/sda7/user1/public_html/

I want all files and folders and subfolders and images and everything inside of public_html. Also to be saved on the same folder so i can find it easy How can i do it?

View 4 Replies View Related

General :: Script To Crc32 Check If Multiple Files Are Corrupt Or Not?

Dec 2, 2010

write a script that scans a folder to see which files are corrupt and if they are move them to another folder.All files have in it's filename CRC32 hash that I want to check if it's correct.Something like this:

Code:
Filename: . . . . .filename S01.E01 [CRC32Sum].mkv
Should have CRC: . CRC32Sum
[code]...

View 2 Replies View Related

Ubuntu :: Command Line (write A Short Script That Will Compress A Specific Folder) - 7zip

Oct 6, 2010

i need to write a short script that will compress a specific folder that`s on the Desktop (and all it`s content) and also will encrypt it with a password that is inside the script --->meaning it wont ask for a password+verification when compressing+encrypting

View 1 Replies View Related

Programming :: Compress Ip Address Ranges?

Sep 19, 2010

I've googled til my brain went boom... So the short story goes; I have lots of ip address ranges in multiple files which need to go into an iptables firewall... Sounds simple right?

Example of files:
1.0.1.0-1.0.1.255
1.0.1.0-1.1.0.255

[code]....

View 3 Replies View Related

Programming :: Script That Creates Files From Svn Checkout And Compress Them Using Tar.gz ?

Oct 22, 2009

I'm creating a script that creates files from svn checkout and compress them using tar.gz the script gets the repository name from command line argument i need to capture a number from the last line of the output and create a file name from it.

The svn returns output of all the file names from the repository and in the end it says: revision number xxxxx. i need to get this number and then rename the tar.gz to it. how do i save the output to a variable and get this number.

This is the script:

Code:

View 1 Replies View Related

Fedora :: Corrupt .gvfs Directory - List The Contents Of /home/Razorblade Folder - Nothing

May 4, 2010

I installed Fedora 12 x64. Now everytime I start my Linux the .gvfs directory in my /home/Razorblade -dir is corrupted. So I have to reboot and start an Linux LiveCD, mount my home partition and delete this folder. After that I can login normally. Symptoms: I am able to login normally, start a browser, start my mail client, list the contents of subfolders of /home/Razorblade/... - everything fine. But as soon as I want to list the contents of my /home/Razorblade folder - nothing but this turning blue thing around the curser. The command line does nothing after "ll /home/Razorblade", sometimes even crashes and closes. As root I am able to do "ll /home/Razorblade" And this is what I get:

[Code]....

View 7 Replies View Related

Programming :: Check Menu & Check List In Utility Dialog?

Aug 19, 2010

I want to put check menu & check list in utility dialog.i dont know how i do this

View 1 Replies View Related

OpenSUSE :: Download Something, Have To Close And Reopen The 'Check' Folder?

Aug 31, 2010

This query is about Machine # 1 - Asus P5Q Deluxe, C2Duo 3.0GHZ, 4.0 GB ram, nVidia 8500, openSUSE 11.2 64-bit, KDE 4.3.5I am having a little concern about the way Dolphin file manager behaves in the 64 bit openSUSE and am wondering if there is a solution for it.Every file I download from the net goes into a 'Check' folder, and I check it over before moving it to it's proper place.In the 32bit version nSuse 11.2, I can watch files being downloaded to that 'Check' folder. I call this realtime file postingIn the 64 bit openSUSE 11.2, I have to close the 'Check' folder and reopen it to see the downloaded file, so, everytime I download something, I have to close and reopen the 'Check' folder. It does not post the file to the folder until the folder has been closed and reopened.I have checked the settings of both machines for Dolphin file manager and see nothing [apparently] different, yet this still persists.

View 9 Replies View Related

Ubuntu :: Check If And Ensure That /tmp Folder Is Always Deleted At Shutdown?

Feb 10, 2010

How can I check if Ubuntu deletes all the content in /tmp folder at each shutdown
(without trial and error)?

How can I tell Ubuntu to delete it?

What about the deletion of other tracks like swapfile at shutdown?

View 6 Replies View Related

Ubuntu :: Script Supposed To Check If There's A Folder - Create If It's Not There

Jul 9, 2010

I have a script that takes a location and does something to them then creates new files in the supplied location. I was trying to get the script to create the location if it didn't exist, but i can't figure out why it won't work. Here's what i've got right now

Code:

#!/bin/bash
destdir=$1
[[ -z "$destdir" ]] && { echo "No destination parameter supplied, exiting"; exit 1; }
[[ ! -e "$destdir" ]] && { echo "$destdir does not exist, exiting"; exit 1; }

[code]....

when i run the first one, it works if the supplied folder exists. If i try with my modification with a name such as /media/place/Foo bar, it creates a folder called Foo in the supplied dir, and bar in the dir i'm in when i run the script. the -p flag on mkdir creates parent directories btw.

View 4 Replies View Related

General :: How To Check Folder If It Has Files In It Using Bash Shell Script?

Aug 4, 2010

there is a folder. Its empty. When every I drag a new file and put into it it echo out "there is file in there" and keep monitoring the folder. How can I do it?

View 7 Replies View Related

Programming :: Make A New Folder For Each File In A Particular Folder

Mar 28, 2011

I been using linux for a while, but I havent had the time to really learn it. Something Id like to get more familiar with is bash so here is a simple example of something I would like to do:

I have a directory full of files. For each file in the directory create a new subdirectory with each files name.

I tried this:

#im already in this directory
aaa=./*
for a in $aaa
do mkdir $a
done

One of the problems is that there are spaces () and - in the filenames so I get many subfolders with names like "-" which i don't want.

I tried stuff like:
aaa=./*
for a in $aaa
do mkdir "'"$a"'"
done

This of course also did not work.

Additional I tried just creating a folder with the name of one of the files and I got this:

mkdir: cannot create directory `(audio) - R56339.EXE': File exists
Well yeah a file exsists with that name, but I want to create a folder- why is there a conflict?

Just to be clear here are the contents of this folder:
~/Desktop/LAB/Media/Drivers - (Image Deployment)/Optiplex_GX260/XP> ls
(audio) - R56339.EXE (NIC-Onboard-Intel) - R54402.EXE
(Modem-datafax-V92) - R54403.EXE OEM_Applications

[Code].....

View 1 Replies View Related

Programming :: Tell If A Folder Is A Link To Another Folder?

Jan 13, 2011

i tried stat and S_ISLNK(st.st_mode) but it always evaluates to false :/ is there anyway i can tell if a folder is a link to another folder?

View 6 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

Programming :: Check If There Is Such A Value In The Database

Feb 10, 2010

sql statement. I am trying to check if there is such a value in the database.

Code:
string NewMovie = "ww";
string queryText ;
queryText = "Select * from movie_info WHERE movie_title = '"+ NewTitle +"'";
MYSQL *conn;
conn=mysql_init(NULL);
mysql_real_connect(conn,host,username,password,database,0,NULL,0);
[Code]......

return 0; The problem i am facing is how do i check if the value is found. I read up and found that a query will return a value of TRUE if the query is a success and a FAIL if there is an error. How do i call these values and then based the check on it?

View 1 Replies View Related

Programming :: How To Check The Environment

Jul 22, 2011

I have written a tiny script for kernel compilation, which call menuconfig and then compile the kernel. It is working fine. Now I like to test my environment and if it is shell menuconfig will be called and if X then xconfig will be called. How can I check the environment then?

View 7 Replies View Related

Programming :: Check If $var Is Not Start With 0

May 25, 2010

I need to check if $var is not start with 0

Code:
read var
if [ $var IS NOT START WITH 0 (or something like 006077) ];then echo 'Good'

View 15 Replies View Related

Ubuntu One :: When Upload A File To A Shared Folder, It Gives The Choice Of Checking A Check Box That Says "publish"?

Jan 16, 2011

When I upload a file to a shared folder, it gives me the choice of checking a check box that says "publish", what's the difference between checking/not checking it?

View 5 Replies View Related

General :: Check Some Folder On A Shared Disk - On Local Disk?

Sep 20, 2011

How to check if some folder is on a shared disk or on a local disk?

View 1 Replies View Related

Programming :: Check If Any Directories Exist, Except A Certain One?

Aug 5, 2010

I need to find if, in a folder any directories exist, except a certain one named "mes croquis".What I am trying to say, is that the re already is a directory named "my croquis", which I have to ignore. IF any other directory appears, I have to archive them.I got everything so far, except the starting condition.In other terms , I am lookign for something like this:

IF anyDir EXIST AND name != "mes croquis"
do something
else

[code]....

View 2 Replies View Related

Programming :: Check If The Variable Is A Number Or Not

Apr 30, 2011

I've created (as a homework) to create as many folders as told but I still need to check if the variable is a number or not :

Code: #!/bin/sh
echo "Veuillez saisir un nombre"; read nmbr
nmbrf=$nmbr
while [ $nmbrf -gt 0 ]
do mkdir -p "foo$nmbrf"
nmbrf=`expr $nmbrf - 1`
echo "$nmbrf"

how do I check that nmbr is a number or something else?

View 1 Replies View Related

Programming :: Check Whether The First Character Is TAB Or Space?

May 11, 2011

I have a file with one line. I want to check whether the first character is TAB or space, how can i do this.? using "cut" wont as it "bypasses the tab and space characters"

View 3 Replies View Related

Programming :: Check The Db For Some Value And Run Some Functions To Do Some Checks?

May 15, 2011

have an application where from time to time I need to check the db for some value and run some functions to do some checks. is the best option do it as php daemon or cron job?Whatworried of cron job is the overalapping.

View 9 Replies View Related

Programming :: Check If Log File Is A Certain Size?

Mar 25, 2010

script that will check if my log file is a certain size? EX: I want to limit the size of my rsync log to say 5MB, if that's true I would move it and create a new one.

View 4 Replies View Related

Programming :: C++ Check If Pointer Is Deleted?

Apr 24, 2011

Is it possible to check if a pointer is deleted in C++ (using GDB)? For example:

Code:
a = new Thing();
b = a;
delete a;

// If all I have is the variable "b", how can I tell if it was deleted?

View 14 Replies View Related

Programming :: Check Server Load Via Php?

Mar 4, 2011

We have 7 webservers running in a cluster, and I have zenoss running which does monitor space, network, even performance, but I would like a nice small webpage that I could break into just a few rows of a table. I would like to be able to simple do a reload every 30/60 seconds, and just have the following;row1: server load, memory userow2: server load, memory useBefore the row, if the load > x change the css to make it red (so I could notice it), etc. The css, the refresh, etc. is all simple, I am jut wondering how I could go about getting the load and memory use from PHP.I could setup a bash script that could get the info and spit it to a file as a last resort, but curious if there was a more direct way.

View 3 Replies View Related







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