Server :: Trying To Delete Data From File With Php

Oct 20, 2010

i've been using php/fwrite to add text to a file using the below code but how do i remove text from a file? note that i don't know what line it's on as there will be other content in the file.

View 5 Replies


ADVERTISEMENT

General :: Delete The File And Its Actual Associated Data?

May 12, 2011

I'm confused about "hard link" feature. I've been learning from my UNIX Academy DVDs training that hard links to a file can be many and each of them is an effective filename for the associated data. So let assume that we have some very sensitive data in a file and we want it to be deleted and file has 20 links. I "delete" a file, but in fact I deleted only one "name" of it. My understanding from the training that data is still there until we delete the last associated hard link. But how can I find the names of all of them? If we have the names, they can be removed one by one. Or may be there's command that can trace all the "names" and remove them at once?

View 14 Replies View Related

Server :: Sync File Server Data Into Backup Server Machine By Command- Rsync -avu?

Jun 21, 2011

iam trying to sync file server data into backup server machine by command- rsync -avu path/of/data ipaddress-of-backup-server:/path/where/to/save after running it ask for root password and manually it is successful.but i want to make it automatic.for that i also tried cronjob and also generated authentication key but iam not successful in login automatically..anybody know how to authenticate root to login for storing data in backup server.

View 14 Replies View Related

Server :: RSync Without Delete Any File On The Destination?

Feb 16, 2010

I'm using rsync for a backup-sript at the moment and want to keep all files. The files are always unique, so I want to rsync without delete any file on the destination.

I've tried with --no-delete and --max-delete=0 but nothing seens to work. Is there even a possibility to do so?

View 2 Replies View Related

Server :: File Server Machine To Store All Data So Being That Have Got Four Identical SATA Hard Drives?

Jan 25, 2011

I've got 4 identical 1 TB drives and would like to use them in a software RAID configuration on my home server. I'm running Debian Linux using 'mdadm' utility to manage the software RAID. I don't know how much I've read is fact or dated or even false so I decided I would ask here to get help from people who know more about this than I do. This is essentially just a file server machine to store all my data so being that I've got four identical SATA hard drives, I was thinking about doing RAID level 5. I guess I'll start here and ask if that is the recommended level of RAID. I think RAID level 5 will be fine for my general server usage. My second issue is partitioning the four individual drives to get maximum performance / space from them. Basically just asking here how would you or you recommend I partition the drives? I was thinking about doing three seperate partitions per drive:

/dev/sda1 = 4 GB (swap)/dev/sda2 = 1 GB (/boot)/dev/sda3 = 995 GB (/)Now from that partition schema above, obviously all the types will be 'fd' for RAID and the partition for /boot is going to be bootable. My confusion is that I read Grub doesn't support booting from RAID 5 since Grub can't handle disk assembly. If /dev/sdx2 (sda2, sdb2, sdc2, sdd2) are partitioned for /boot (bootable), how would you guys configure this RAID to match up equally? I don't think I do a RAID level 1 on 4 identical partitions, right?

View 1 Replies View Related

General :: Delete A File On A Remote Server Using Shell Scripting?

Jul 18, 2010

delete a file on a remote server using shell scripting.

View 14 Replies View Related

Server :: Find A String In A File And Delete That Line As Well As X Lines After?

Jun 24, 2010

I need to find a string in a file ... then delete the line it is on, as well as the next 6 lines. Or, delete the line the string is on and all subsequent lines until the search finds the character "["

example:

filename = test.txt

contents:
[foo]
test>test
test>test
test>test

[Code]....

so, in this example. I'd like to search the file for string 'foo' and delete all lines from that line until [bar] (not deleting the line with [bar])

View 3 Replies View Related

Server :: How To Www-data Chown A File

Jun 11, 2010

I have a php script that creats some files and moves them into certain directories. When the files are created, the ownership is www-data:www-dataWhen they are moved to the appropriate directories the maintain that. But, I need the files' ownership to be changed to asterisk:asteriskHowever, www-data doesn't have permissions to do this. I don't want to run a cron as root that does this (I'm already doing that). I really wish there was a way for my files to be created via my php script and in that same file do something like:
system("chown asterisk:asterisk /home/test/test.call");

View 7 Replies View Related

Ubuntu :: Delete File - No Right Click Delete Option?

Feb 18, 2010

Why is there no Delete when I right click like there is with Windows in ubuntu? Pretty much everything else is there like new folder and so on Is there some way to add it? Also why when i delete something does it not ask me if I am sure that i want to delete that file?

View 6 Replies View Related

Server :: Accessing Database In FBD Data File

Feb 19, 2011

We purchased a new database system at work last October, ditching the old system because of a lack of support from the vendor. This is a retail Point of Sale and Backoffice database system. I am not sure what system the new one runs on, but the system we replaced was a Firebird data base. The reason I am posting is because we are now in need of the information contained in the old database which was not completely imported into the new system. Unfortunately, we parted company with the old vendor under extremely hostile conditions, and they are not a source of help for this problem, nor are the new vendors.

Basically the problem is this: The database in on a Windows XP system and I found a copy of SQL Manager Lite 2008 on the system, which after quite a bit of studying, I figured out how to extract the database into a removable file. I have this file (178MB) on a USB stick in a file called Backoffice.fbd. I can get into this database with MySQL. All I want to be able to do get into the database and create tab deliminated spreadsheet files for each of the database sections (Customers, Repairs, Sales History, stock files, etc.) Is it possible to do this with Ubuntu and MySQL and if so, can an expert suggest one or two things to get me started.

View 3 Replies View Related

Server :: Data Recovery - File System EXT3

Sep 30, 2009

I have lost the data of my drive having file system ext3, please tell me the most reliable softwares for data recovery, please try to tell also GUI software.

View 1 Replies View Related

Ubuntu :: Ddrescue Delete My Data

Jun 2, 2010

I tried to clone my laptop ubuntu partition (9.10) using ddrescue into my portable harddisk.I run command "ddrescue r3 /dev/sda6 /dev/sdb6" sdb6 is my portable harddisk partition with lots of data. In my head I was thinking that it will create image file (like iso or img)that can be restored to another disk.Suddenly I relize that it delete my existing data (in sdb6) then I interrupted ddrescue.Is there a way that I could get back my data in sdb6?Partition in sdb6 is FAT32m, now when I try to open sdb6 using Windows OS, it always aks me to format

View 6 Replies View Related

Ubuntu :: GUI App To Delete Data Permentantly?

Sep 15, 2010

Is there a GUI solution to permanently destroying data on my external HD? I know there are some command line options but I am looking for a GUI solution.

View 7 Replies View Related

Server :: Append A Set (or Sets) Of Data To A File(or Files) On Remote Hosts?

Dec 26, 2009

If I need to append a set (or sets) of data to a file(or files) on remote hosts what is the best mechanism by which to do that? My first thought was ssh but the command syntax to append to a remote file isn't clear to me. Can anyone point me in the right direction here?

View 4 Replies View Related

Fedora Servers :: How To Delete LDAP Data Base Bdb

Aug 29, 2011

Please let me know how to delete/flush complete LDAP database ? I tried deleting all files from /var/openl dap- data. but still top level data base attributes remains.initially I had set shadowExpire,shadowFlag etc, I want to remove all these.Kindly help me to build my new database.

View 5 Replies View Related

Ubuntu :: Completely Delete Windows Data And Clean Install 10.10?

Dec 6, 2010

First how can I clean install Ubuntu 10.10? I am currently using Windows 7 and want to clean install Ubuntu 10.10.

Secondly, I have Apple iPod Touch 4th generation 32GB model. So how can I install iTunes on Ubuntu??

installing Ubuntu. I want to completely delete my windows data and want to clean install Ubuntu 10.10

View 9 Replies View Related

Ubuntu Servers :: Access The Data In .fbd Data File

Feb 19, 2011

We purchased a new database system at work last October, ditching the old system because of a lack of support from the vendor. This is a retail Point of Sale and Backoffice database system. I am not sure what system the new one runs on, but the system we replaced was a Firebird data base. The reason I am posting is because we are now in need of the information contained in the old database which was not completely imported into the new system.

Basically the problem is this: The database in on a Windows XP system and I found a copy of SQL Manager Lite 2008 on the system, which after quite a bit of studying, I figured out how to extract the database into a removable file. I have this file (178MB) on a USB stick in a file called Backoffice.fbd.

My studying suggests to me that I can get into this database with MySQL. I have never used this and have no clue how to do this. All I want to be able to do get into the database and create tab deliminated spreadsheet files for each of the database sections (Customers, Repairs, Sales History, stock files, etc.) Is it possible to do this with Ubuntu and MySQL and if so, can expert suggest one or two things to get me started. While a guided tutorial would be nice because I am not an expert, I am willing to learn on my own if someone could point me in the right direction.

View 3 Replies View Related

Ubuntu :: Changing The Type Of Partition From A Ect4 To Fat32 But Will This Delete My Data?

Dec 5, 2010

i currently have both xubuntu 10.10 32-bit and windows 7 64-bit installed on my laptop which i use mostly for college work and basic programming (i'm still learning to program).i have a 150gb partition with win7 installed, a 20gb partition with xubuntu installed and a 15gb partition with my linux home folder on, the rest of the space is unused because i thought i may need it for something else in the future.the home folder partition is formatted to etc4, i now have a need to access this data from win7 for college work, i know that windows doesn't support mounting of etc file systems so i have hit a problem.

i thought about changing the type of partition from a ect4 to fat32 but will this delete my data? or ,are there any third party software packages for windows that will allow me to mount ect4?

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

General :: Remove Write-Protected File - Will It Actually Delete The Password File?

Jul 30, 2010

When I ls -l /etc/passwd, -rw-r--r-- 1 root root /etc/passwd When I login as myself, and rm /etc/passwd, it asks: rm: remove write-protected file '/etc/passwd'? If I say yes, will it actually delete the passwd file?

View 1 Replies View Related

Red Hat / Fedora :: Edit A Text File To Delete All Commas In The File?

Jan 4, 2011

i want to find a command line way to edit a text file to delete all commas in the file. i do not want to replace them w/ anything.

View 2 Replies View Related

Programming :: Sed Delete Lines From File One If Regexp Are Listed In File Two?

Sep 17, 2009

I am trying to delete lines of a file if they contain text that is present on another file. For example

> cat one.txt:

a
b
c
d

[code]....

I get the following output:

> ./test.sh one.txt two.txt
a
b
d
e

[code]....

View 6 Replies View Related

General :: Stale NFS File Handle - How To Delete File

Jan 21, 2010

How do I delete a file if it happens like this.
-????????? ? ? ? ? ? temp.cgi

View 5 Replies View Related

OpenSUSE :: Delete Files On Data Partition Slow Because Trash Is Located On Home Partition?

Aug 18, 2011

KDE 4.6 - opensuse 11.4.

I have a separate ext4 partition which contains all my data (music, movies, etc). When I delete files from this partition it is very slow because it copies files from my data partition to the Trash folder in my home partition. How can I avoid this? Can't the trash be configured so that it uses a trash folder in each partition instead of copying files to another partition (which is slow).

View 9 Replies View Related

General :: Make Arithmetic Operation Of Data File With Script File?

Aug 31, 2010

I wonder how to arithmetic operation of our data file using any script program/command (like sed, cut,awk)for example my data.file is:

45 65 42
12 23 61
43 34 21

I want to multiply first column with 2 and add second column with 3 then it become

90 68 42
24 26 61
86 37 21

View 5 Replies View Related

General :: Data From Input File To Be Taken And Send To Output File?

Jul 24, 2010

I am new to shell scripting.What i am trying is to write a shell script which take the input file and output should like as mentioned below.Output file should have data till SOK (marked in red)from every second line and then the selected data(marked in green) from 4th line.So selected data from 2nd and 4th line in one line of O/P file and then similarly selected data from 6th and 8th line in second line of O/P file.Input File:

3c3
< c1111;11.11.11.11;pOK;SOK:abcde;Universe:aa
---

[code]...

View 14 Replies View Related

Server :: Copy/delete Files On Remote Server?

Jul 6, 2010

Allright, I made a simple script that tarballs my SQL databases weekly and saves them to a backup harddrive.If possible, I would like to have the backups uploaded to a remote server for storage. But, I must have the script delete the previous upload for size contraints.I can only use rsync, scp or sftp. Haven't used any of them really before... Here's my basic tarball-backup script:

Code:
#/bin/sh
# Dates the new tarballs of current builds.
DATE=`date +%m_%d_%Y`

View 8 Replies View Related

Ubuntu :: When Delete A File, It Really Isn't Gone?

Jun 15, 2010

In Windows when you delete a file, it really isn't gone.Have to have special software to actually wipe it.what programs in Linux/Ubuntu are along same lines.secure delete a file, secure empty trash, clean the hard drive unused areas (where files once were).Are they in package manager, synaptics or on the web?Update. I took the new Ubuntu system with me on road trip this weekend as a trial.Wireless network connection is from across street. Connected just fine.Hook Nikon camera in to D/L pics, "saw" camera immediatelyForgot cell phone charger at home. Used the USB cable. "saw" phone immediately and phone said charging.So, so far all is well just some things are done a little differently than windows!

View 9 Replies View Related

Ubuntu :: Can't Delete Certain File

Oct 30, 2010

I put a MicroSD card in to a card reader, it's from a Nokia mobile phone, and then plugged that in to the USB port.For some reason I can't delete certain files. I am assuming my phone has some kind of virus.Ubuntu refuses to let me access, modify or delete the files that are in the music folder but clearly not music files.

So I tried to open the folder with Wine to try and delete it the windows way (I have no idea if that was even supposed to work) and I get an error message that says 'File not Found' in a typical windows error display box.Now I am having the exact same problem trying to open my home folder from the places menu. The same error pops up.All I want to do is clear a MicroSD card and put new music on it.Also, I am the only user on this computer, and I have administrator privileges, and I cannot access the root folder or the lost-found folder.

View 9 Replies View Related

Ubuntu :: File Could Not Delete?

Dec 23, 2010

I used external hard drive to keep my back up and my machine stored same file in media folder of my machine which occupies all my hard disk space. Now I wanted to delete it but I could not delete it. How can I delete it to free up the space

View 9 Replies View Related







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