What Is Linux Command For Compressing The Contents Of A Directory?

Oct 13, 2009

What is Linux command for compressing all the files under a Directory, as
well as all the files in sub-directories under that directory, so that upon
uncompression the files are created in the right directory and sub-directory.

Also of course what is the command to un-compress this compressed file?

In case: the Linux OS here is Redhat Enterprise and the web server is Apache.

View 7 Replies


ADVERTISEMENT

Simple Bash Command To Copy Only Directory Contents

Sep 15, 2007

Can anyone tell me a simple way in Bash to copy all of the contents of a directory (and only the contents), including hidden files, into another, existing directory?

E.g.

Code:

# I have this directory structure
- directory_A
--- existing_file
-
- directory_B
--- some_file
--- some_subdirectory
--- .some_hidden_file

# I want to end up with this

- directory_A
--- existing_file
--- some_file
--- some_subdirectory
--- .some_hidden_file
-
- directory_B
--- some_file
--- some_subdirectory
--- .some_hidden_file

# I *don't* want this

- directory_A
--- existing_file
--- directory_B
----- some_file
----- some_subdirectory
----- .some_hidden_file
-
- directory_B
--- some_file
--- some_subdirectory
--- .some_hidden_file

So far I've been stymied in finding a simple way to do this from the command prompt.

View 1 Replies View Related

Move The Entire Contents Of A Directory Tree To Another Directory

Sep 18, 2008

I want to move the entire contents of a directory tree to another directory.

So for example we may have a directory with 15 directories inside, each directory contains files itself. I want to copy all the files from the directory tree into another directory located somewhere else one the file system. I want only the "files" to end up in the other directory and not the file structure too.

Im running CENTOS latest version.

View 4 Replies View Related

Zipping The Contents Of Directory

Jul 28, 2008

Zip the contents of a directory (/path/to/dir/*) and then include a file in that zip that is located here: /a/whole/different/path/file.jpg. Is there a ZIP parameter that allows me to include that JPG file in the ZIP file that I am creating? Can someone give me the command?

Also, instead of zipping the contents inside of the "dir" directory, can I zip the "dir" directory itself but exclude the full path when creating the zip (/path/to/ part). I can do this with the -j parameter but when I do it also excludes the "dir" directory and only ZIPs the content inside of it.

View 3 Replies View Related

Unix Command :: Space A Directory Taking?

Feb 21, 2008

what is the linux command to check, how much space is a directory taking?

and

what is the linux command to check, how much space are directories taking in increasing or decreasing order of there sizes?

View 2 Replies View Related

Plesk 12.x / Linux :: Unable To Add Certificate To Site - File Put Contents Failed

May 23, 2015

When i add the private key and certificate via plesk panel, i get the following error:

ERR [panel] Unable to set the certificate: Unable to put certificate file: Unable to arrange cert file: file_put_contents failed:

View 1 Replies View Related

CPanel Directory / Sub-Directory Protection (Linux Shared Hosting)

May 31, 2007

I have a situation like this:

There is a directory say, "Master" and inside, "Master" there is sub-directory, "Slave". A user who has access to, "Master" should be able to access, "Slave" automatically. However, a user who has access to, "Slave" should not have access to, "Master". Inside cPanel this type of protection is not possible.

View 3 Replies View Related

Backup Solutions - Compressing Partition & Transfer

Aug 6, 2008

I administer a busy forum and require a best backup solution.
(Servers are clustered and running Debian Etch)

Currently when backup script packs the whole partition using command:
tar cvzf /backup/webroot/webroot-(today's-date).tar.gz /webroot
But, this causes huge load on to the server and the whole website becomes unavailable during this time.

Since the number of files is huge, it takes around 10-15min for it to finish.

Now, I need another software or a way to limit tar's load on to the system so that the website doesn't go down during the backup process.

(dd would work as /webroot has it's own partition but I'm not sure on how it the load goes with it and also if it works with cron)
Do you know any good solution?

Also, right now all backups are on each server separately.

To clarify, mysql server's backups are on mysql server and actual files' backups are on web server.

As you may have realized, this is very bad as it won't protect me from harddisk failures and hackings.

(Hacker can just delete the whole thing and website will be gone forever...)

So, to prevent them from happening and also for central management of the backups, I got a server just for backups.

Now, I need a way to transfer the backups to it.

What software do you recommend to accomplish this?
(scp, rsync, ncftp, etc...)

Some of you may say R1Soft's CDP is the best but I would like to have that as my last option because I don't want to rely on another company when it comes to backups.

View 5 Replies View Related

About TOP Command - Linux

Nov 12, 2008

is there a way to look which process/user used the most cpu in last 30min or in last hour.

View 3 Replies View Related

Linux Command

Oct 16, 2007

on linux how can i delete files older than the current month (that is leave only this month's files) from one subdir and recurse every directory?

View 8 Replies View Related

Linux Command To Check New Files

May 29, 2008

what command to type if I want to check all latest files (edited/saved) on a certain folder?

View 2 Replies View Related

Plesk 12.x / Linux :: How CLI DNS Command With Wildcard

May 3, 2015

I want to run a script that will loop through all of the domains on a particular server and remove all MX records with mail.*.I am testing on a single test domain at the moment but I'm not sure how to do the wildcard./usr/local/psa/bin/dns -d example.com -mx '' -mailexchanger mail.*

The following example command is from: URL....To add an MX resource record mail3.example.com specifying domain name mail.example.com as the mail exchanger for the record, and setting the mail exchanger's priority to the DNS zone on the domain example.com to 15:

# ./dns -a example.com -mx mail3 -mailexchanger mail.example.com -priority 15..​What does the mail3.example.com got to do with it? Isn't it just adding a MX record mail.example.com?

View 1 Replies View Related

Function.file-get-contents

Mar 25, 2009

I got this warning message from a script I was working on to read XML feeds.

Warning: file_get_contents(url) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:Apache2.2htdocs est5.php on line 8

but when i run the url itself, it works fine.

i already set allow_url_fopen = On

View 2 Replies View Related

How To Set Up Exim On Linux Server To Not Allow More Than One Recipient Per Command

Nov 28, 2008

how to set up exim on a bare linux server to not allow more than one recipient per command?

I don't want to allow, for example, mail lists.

Example of exim command
2008-11-19 20:14:11 [2135] cwd=/path/to/account 3 args: /usr/sbin/sendmail -t -i
2008-11-19 20:14:11 [2135] 3L5JXP-0001bH-MF <= apache@server.com U=apache P=local S=1091 T="Bla bla" from <apache@server.com> for mail1@ee.com mail2@dd.com mail3@dfffg.com ETC ETC ETC

View 3 Replies View Related

Executing A Linux Command Via Text Message

May 24, 2008

how I might be able to execute a Linux command by sending a text message to some email address? Where if that email address gets a message (either any message, or perhaps only messages containing some password), a Linux command is executed, e.g.

named -u named
Perhaps via bash script.

View 14 Replies View Related

Auto Complete Feature For Linux Command

Jul 20, 2007

I am wondering is there any software could offer auto complete feature for linux command? most linux need enter lots of parameters, if there is such a tool, that could be cool & great.

View 6 Replies View Related

Plesk 11.x / Linux :: Command To Validate All MUs Have Been Applied?

May 19, 2014

With the endless security patches, is there a command that can be used to verify that all current microupdates have been applied?

View 4 Replies View Related

Plesk 12.x / Linux :: Cannot Remove PTR Record With DNS Command

Mar 10, 2015

i have to delete all PTR records in over 80 domains in a Plesk 12 panel, when i tried to run the dns command to remove the PTR record from a domain, i got the error :

Code: Unable del record in DNS server: unable find DNS record ...

There is a KB article about this specific problem : [URL] .... , but it refers to older Plesk versions (8.x-10.x). I gave it a shot by copying the fix file from all 3 different versions to /usr/local/psa/admin/plib/api-common/ and i got the following PHP errors:

Code:

PHP Warning: include_once(class.PHostingManager.php): failed to open stream: No such file or directory; File: /usr/local/psa/admin/plib/api-common/cuDns.php, Line: 4
PHP Warning: include_once(): Failed opening 'class.PHostingManager.php' for inclusion (include_path='/usr/local/psa/admin/plib:/usr/local/psa/admin/externals'); File: /usr/local/psa/admin/plib/api-common/cuDns.php, Line: 4

[URL] ......

Is there any workaround this PTR issue? Also, is Parallels going to update the article and provide solution for Plesk 12?

View 4 Replies View Related

Plesk 12.x / Linux :: Command Died With Status 100

Mar 30, 2015

Up till the last update Plesk was working correctly. After the latest update I can't send out mail in any form:

webmail, pop3, wordpress forms, etc.

This is the error message I get:

Command died with status 100: "/usr/bin/spamc".
Command output: Mail handler 'limit-out' said: REPLY:554:5.7.0
Your message could not be sent. The user spamfilter is not allowed to send email.

When I reverted back to the last snapshot before the update everything works fine again. But the automated update bot messes it all up again when it downloads the newer version.

View 2 Replies View Related

Plesk 12.x / Linux :: Postfix - Command Rejected

Jul 25, 2014

I just upgraded my Plesk 11.5 on Plesk version: 12.0.18 Update #9 , and after the upgrade the Postfix stop working. And forwarding, receiving is not working at all and I am getting message bellow.

OS: CentOS 6.5 (Final)
Plesk version: 12.0.18 Update #9

This is the mail system at host nsXXXXX.ovh.net.You can delete your own text from the attached returned message. mail system

<xyz@gmail.com>: Command rejected

Final-Recipient: rfc822; xyz@gmail.com
Action: failed
Status: 5.7.1
Diagnostic-Code: X-Postfix; Command rejected

View 2 Replies View Related

Actual Images And Contents Do Not Show Up

Jun 26, 2008

i have to reload a page several times. at least once. the templates show up fine, but the actual images and contents do not show up unless i reload the page....this is evident during peak hours but not during normal hours.....

i've done tracert, no lost packets.

View 5 Replies View Related

Linux Proc Command & Which HDD On Server Scsi Or Sata

Jun 20, 2008

1) what is the command to find out what processor is installed on the server

2) how do i find out what type on hdd i have sata or scsi?

whats the ssh command to find these two things out?

View 3 Replies View Related

Plesk 12.x / Linux :: Command Line CLI DNS Template Changes Warning

Jul 23, 2015

I'm using this script as a cron to generate DKIM keys for the domains I have. It's an easy script. And it does it's job just OK. I have the necessary software installed and configured.

The way it works is:

The script check if the domain in queue has a record for it. If it doesn't, OpenDKIM generates a one time DKIM record for mail._domainkey that I am entering to my dns records for all the domains I have.

After creating the DKIM record, it checks and deletes mail._domainkey records if there's any. Then adds the generated DKIM to plesk dns zones and disables/enables greylisting to create the appropriate dns entry.

If it does have a DKIM recors on the hdd already, then it removes

mail._domainkey​and
TXT o=-​entries.

After that it basically adds the already generated DKIM record and it disables/enables the greylisting for each domain in order to recreate "TXT o=-"

Up till here, it works fine. I can see these entries when I check the DNS Settings. They are there.

But whenever I run this script either via cron or manually, I get an error message on my panel: (You can check the screenshot as well)

Code:

Warning: The DNS zone was modified. If you would like to apply DNS template changes to this zone, either click the 'Apply DNS Template Changes' button on this page or choose the 'Apply the changes to all zones' option in Server Administration Panel > Tools & Settings > DNS Template Settings > Apply DNS Template Changes.

And unless I manually click "Apply DNS Template Changes" for EVERY SITE it doesn't go away.

So, I was wondering, is there a way to scriptize that command? Or how to prevent it?

This is the command I use to generate DKIM and add it to Plesk database, also if any such record exists, delete and re-write it:

Code:

#!/bin/sh
ADMIN_PASS=`cat /etc/psa/.psa.shadow`
MYSQL_BIN_D=`grep MYSQL_BIN_D /etc/psa/psa.conf | awk '{print $2}'`
mysql="${MYSQL_BIN_D}/mysql -N -uadmin -p${ADMIN_PASS} psa"

query="select name from domains;"
domains=`echo $query | $mysql `
for i in ${domains}; do
echo "Processing $i"

[Code] ....

View 4 Replies View Related

Plesk 12.x / Linux :: CLI - Scheduled Backup From Command Line

Apr 9, 2015

I'm looking to set up a schedulled backup from command line.

I haven't found the correct command, could you tell me if it's possible and how ?

Additional question: I'm looking too, to set for the server the max number backup file to save, do you know how to do it from cli ?

View 8 Replies View Related

Plesk 12.x / Linux :: Remove Backup Via Command Line?

Jan 17, 2015

Is there a command line way of removing Plesk backups?

I'm looking for the command line equivalent of these steps: Log into Plesk as the server admin > "Tools & Settings" > "Tools & Resources" > "Backup Manager" > check a backup and click "Remove".

We have a script that copies the contents of "/var/lib/psa/dumps/" to Amazon S3 for long-term storage of backups. It runs nightly after a scheduled Plesk backup. Once that script completes successfully, we'd like to delete the Plesk backup to free up disk space. We have Plesk's "Maximum number of backups in the repository" set to 1.

But Plesk appears to keep that backup around while creating a new backup (which makes some sense). This is causing us trouble because the server does not have enough disk space for two backups. As a temporary solution, I'm manually deleting the backup each day through the Plesk admin, but would like to automate it if possible. If automation is overly complex/risky, we'll look at upping our disk space instead.

View 4 Replies View Related

Plesk 12.x / Linux :: Command Line Mail In Chroot?

Feb 23, 2015

Is there any way for a client to use command line mail in a script. Client has ssh access via chromed environment.

Wants their script to be able to send an email on completion.

plesk 12 on Centos6.6

View 6 Replies View Related

Plesk 12.x / Linux :: Execution Failed Command - Autoinstaller

Apr 13, 2015

while plesk was trying to update automatically (as per the normal preference settings) but suddenly gave this error

Execution failed.
Command: autoinstaller
Arguments: Array
(
[0] => --select-product-id
[1] => plesk
[2] => --select-release-current
[3] => --upgrade-installed-components
)

Details: Doing restart of Parallels Installer...
File downloading products.inf3: 100% was finished.
File downloading plesk.inf3: 10%..20%..30%..40%..50%..60%..70%..80%..90%..100% was finished.
File downloading ppsmbe.inf3: 17%..26%..37%..47%..57%..78%..88%..100% was finished.
File downloading sitebuilder.inf3: 22%..35%..48%..60%..73%..86%..100% was finished.

[code]....

ERROR: Currently installed version of product with ID 'plesk' is not available from download site anymore.Please upgrade to the next available product version to receive software updates.Seems like the RPM got damaged, but I already fixed that part, now when I put "install" I'm geting the following
Installation started in background..Getting bootstrapper packages to installation list:

Following bootstrapper packages will be installed: (empty)
----------------
Getting packages to installation list:
Following packages will be installed: (empty)
----------------
Loaded plugins: fastestmirror

Patch for plesk 12.0.18 will not be installed since it is already applied.Error: You already have the latest version of product(s) and all selected components installed. Installation will not continue.HOWEVER the "mail" and mail server configuration no longer shows in "tools & settings".

View 1 Replies View Related

Plesk 12.x / Linux :: No Output For Command Mailq After Upgrading To 12.0.18

Apr 2, 2015

We have a plesk server running on a Ubuntu 14.04.2 LTS machine. We check the state of the mailqueue with nagios, executing the "mailq" command. After the AutoInstaller upgraded our installation from 12.0.18 update 38 to 39, we noticed, that the nagios check failed.

After investigating a little bit, it seems that we found the problem:

When I enter "mailq" in the shell, the command is executed and gives me an proper output. But when I try to execute the command with its full path "/usr/bin/mailq" nothing happens, and I have to cancel with [ctrl]+[c]. The which-command delivers exactly the same path as written above...

View 4 Replies View Related

File Get Contents :: Internal Server Error

Jun 22, 2008

When some jobs done via php scripts which use file get contents , page gives internal server error without waiting.

View 3 Replies View Related







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