Removing File -bash: /bin/rm

Mar 31, 2007

Sometimes if I tried to use rm to remove too many files I got this:

-bash: /bin/rm: Argument list too long

I think there was a workaround, like ls and then piping the result to rm, but I forget.

View 3 Replies


ADVERTISEMENT

Bash: Sequentially Duplicating A File

Jan 24, 2007

i was wondering if there's a way i can create a number of files in a sequential order via bash.

i have a file, 'example.ext', i want to duplicate this so that i have:
1example.ext
2example.ext
3example.ext
4example.ext
.
.
.
300example.ext

i could use a bash list ('{' and '}') with the cp command but i believe the curly braces can be used as the source parameter and not the destination.

i could write a shell script but i'm not too conversant with shell scripting.

View 6 Replies View Related

Yum Install :: Bash: ./configure: No Such File Or Directory

Apr 21, 2008

Trying to install yum no RedHed EL4 with Python 2.3.4. I have downloaded [url]and untarred it. I cd'd in the to untarred directory. I then went to ./configure and it gave me:
./configure
-bash: ./configure: No such file or directory

View 8 Replies View Related

Apache :: Removing PHP For One File Only In HTAccess

Jun 11, 2014

I'd like to change /comp.php to /comp but I have only found articles on how to remove .php completely and I don't want to do that, only want to do it for this one file.

View 5 Replies View Related

Apache :: Removing File Extensions With RewriteEngine Doesn't Work

May 7, 2015

I'm trying to accomplish a rather common task of removing file extensions, where say, instead of index.php, just index can be accessed.

I've gone through many tutorials that offer all sorts of different ways how this can be accomplished and none of it works but what's commonly given is something like this.

View 4 Replies View Related

Plesk 11.x / Windows :: Prevent Removing Files On File Manager

Jun 4, 2014

How Can I prevent users removing file web.config on FileManager?

I try set attribute read-only, but not effect.

View 4 Replies View Related

You Have A Mail Bash:~#

Jun 15, 2008

I opened up my VPS bash today and I saw a message like this:

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
..........................
..........................
You have a mail.
bash:~#

Now I am confused from where have I received a mail, and even if I have received it why doesn't it shows in Google Apps??

I have set the MX Entries correctly and when I sent a mail specifically to admin@mysite.com , I do get a mail in google apps.

Anyways where does this mail lie, how can I view this mail ?? I installed postfix as my mailing server.

View 6 Replies View Related

SSH Bash Error

Aug 9, 2008

When I log into my clients VPS via SSH and I get the following error...

login as: root
root@69.162.67.44's password:
Last login: Sun Jan 20 23:33:36 2008 from 122.167.25.31
-bash-3.1#

View 11 Replies View Related

Bash SSH Command

Jun 30, 2007

I've just about got my mysqldump script ready,

Here is what it looks like:

Code:
#!/bin/sh
mysqldump -uusr -ppwd --opt db > /home/usr/dbs/1.sql
mysqldump -uusr -ppwd --opt db2 > /home/usr/dbs/2.sql

cd /home/usr/dbs
tar -zcvf sqldata.tgz *.sql

How would I make my finished gzipped file's filename to include the date?

Would I add any tags infront of sqldata.tgz *.sql?

Or would I have to run another command after the last line?

View 14 Replies View Related

Bash Script

Jun 1, 2007

I could use a bash script for a crontab that does a regular backup of my mysql database.

Unfortunately i can't employ one of the made-up backup scripts using mysqldump because i need to use mysqlhotcopy (that's because i need the raw data for a charset mess in mysql with some foreign languages not classifieds as utf8 .. long story), and i'm a total ignorant of perl and bash scripting.

The script (that will be recalled via cron) has to:remove all the .tar.gz files older than X days in the folder /xxx/backup, if the folder contains more than X tar.gz files
create a folder /xxx/backup/$todaydate call the command "mysqlhotcopy --bla -bla -bla " that will copy the dbase in the previously created /xxx/backup/$todaydate folder
at the end of the previous operation (if successful) compress the $todaydate folder in a $todaydate-sqlbackup.tar.gz file at the end of the previous operation (if successful) delete the uncompressed folder. launch the "rsync -bla -bla" command to syncronize this folder with a remote server I thought it will be something like a 10lines script, and i'll be glad to hand you a couple of virtual beers (via paypal ) as a thank you sign, but if the script is not trivial and you're willing to help anyhow, of course i'm willing to pay more.

View 1 Replies View Related

Apache As Bash

Dec 6, 2007

apache 11421 0.0 0.3 2704 1712 ? Ss Oct09 4:35 bash
apache 11625 0.0 0.1 1912 884 ? Ss Oct09 1:12 bash
apache 14454 0.0 0.0 1764 128 ? Ss Oct17 0:00 /usr/sbin/apache
apache 15216 0.0 0.2 2308 1356 ? Ss Nov10 1:58 bash
apache 19597 0.0 0.2 2308 1336 ? Ss Nov10 1:50 bash
apache 22164 0.0 0.3 2704 1772 ? Ss Oct11 1:11 bash

I stopped apache but can see these when i do ps aux.

View 2 Replies View Related

Litespeed And Bash Script

Jun 4, 2009

I'm having a problem with litespeed and apache, every time when I reboot the server listespeed and apache(both) are started and the server uses apache. I configured litespeed to use a conf file of apache so I can't remove just apache. I need a way when I restart the server litespeed is started and apache is stoped

2nd problem. how to make this in a batch script
The script will backup a directory every month and I need in every backup get a date like this directoryname-date(day/month/year)

View 4 Replies View Related

Cannot Modify Bash Profile

Mar 1, 2008

Code:
-rw-r--r-- 1 root root 975 Dec 22 2006 .bash_profile
root@server [~]# rm -f .bash_profile
rm: cannot remove `.bash_profile': Operation not permitted

root@server [~]# chmod +t .bash_profile
chmod: changing permissions of `.bash_profile': Operation not permitted

I simply wanted to modify something within the file but I keep getting permission errors. I'm logged in as root.

View 3 Replies View Related

Linux BASH Scripting

Dec 7, 2008

I am currently trying to create a bash script which I will run off a loop with a sleep interval that will query tcpdump (udp packets only) on a network interface, and is looking for length 10 packets.

So far so good, not that hard to code I know (Already made it / coded it this far perfectly). Now here is the tricky part, I only want the bash script to identify IP's that have sent over 15 packets with the length of 10. (This is the part that I can't seem to find a way to code).

I was thinking, from the output maybe to calculate the number of lines with the same equal IP's.

Once this script identifies that, it will automatically run a command which I have set. (Quite easy, and I can do this).

I am looking for someone to help me with this. It is a fairly simple and quick job (editing the script I have at the moment). I am willing to also pay (if needed) an amount for this to be completed too. Obvieusly not that much, but still something I am sure we can work out.

View 2 Replies View Related

Simple Bash Script

Sep 24, 2007

somebody to write a very simple bash script to me , which will help me to "wget" some text files!

i want to do the following:
wget [url]

X changes for evey folder (main group)
Y will change for every file in the folder.

eg:
[url]
[url]
[url]


the next group:

[url]
[url]
[url]

The X value range [1-100]
the Y value range [1-13]

View 3 Replies View Related

Bash Commands On Windows

Jun 5, 2007

I asked around and found [url] and win-bash.exe on source forge.

View 1 Replies View Related

Bash Script - Visit A Website

Jun 7, 2009

I need to make a bash script, when I run it ./script.sh it needs to vivit a website - [url]/something.php where something.php has some function, e.g for emails, so when someone visit something.php it sends email to my email address. I just need a way to visit it via bash script

View 10 Replies View Related

Bash Automate The Installation Of YUM, CPanel/WHM And CSF

Jul 2, 2009

I am trying to automate the installation of YUM, cPanel/WHM and CSF.

I have written a script that works perfectly all the way down to installing CSF...

It gives me the following error when moving onto the CSF installation;

--05:03:37-- [url]
Resolving www.configserver.com... 85.13.195.235
Connecting to www.configserver.com|85.13.195.235|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 433358 (423K) [application/x-tar]
Saving to: `csf.tgz'

100%[=======================================>] 433,358 338K/s in 1.3s

05:03:39 (338 KB/s) - `csf.tgz' saved [433358/433358]

--05:03:39-- http://%0D/
Resolving 15... failed: Name or service not known.
FINISHED --05:03:39--
Downloaded: 1 files, 423K in 1.3s (338 KB/s)
tar:
: Not found in archive
tar: Error exit delayed from previous errors
./cPanelServer.sh: line 9: cd: csf: No such file or directory
sh: install.sh: No such file or directory
./cPanelServer.sh: line 13: unexpected EOF while looking for matching `"'
./cPanelServer.sh: line 18: syntax error: unexpected end of file
Script Contents;

Code:
./yum.sh
cd /home
wget layer1.cpanel.net/latest
sh latest
cd /
rm -fv csf.tgz
wget [url]
tar -xzf csf.tgz
cd /csf
sh install.sh
echo -n "TESTING = "1"
read word
sed "s/$word/TESTING = "0"/g" /etc/file.conf > /etc/file.conf.new
mv /etc/file.conf.new /etc/file.conf
service csf restart

done

It's seems the script is having issues extracting "csf.tgz", but I have no clue.

TBH, this is my first ever script and I'm surprised any of it works!

View 6 Replies View Related

Bash Script - IP Banning With Iptables

Apr 28, 2009

my VPS provided didn't enable a lot of modules and that's why I can use a firewall(csf or apf) and dos deflate script

I need a simple script for it.

First,it has to call this:
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
then there will be something like:
Number : IP address
20 1.2.3.4
40 1.2.3.5
80 1.2.3.6
and then the bash script has to bann IPs with more than 30 connections(In our case: 1.2.3.5 and 1.2.3.6) with this:
iptables -A INPUT -s IP_FOR_BLOCK -j DROP

View 14 Replies View Related

-bash: Netstat: Command Not Found

Apr 2, 2008

i got a new sever and was looking at few thing.

just ran netstat and saw this -bash: netstat: command not found

how can i correct it?

View 7 Replies View Related

Bash: Locate: Command Not Found

May 10, 2008

I have a problem with my server

when I do

locate ***

-bash: locate: command not found

& I did

updatedb

-bash: updatedb: command not found

View 13 Replies View Related

Bash And Remote Files In If Statement

Jun 22, 2007

I am trying to see if a file exists on a remote server but am not getting what I expect. (This is my first Bash script).

Code:
remotefile=[url]
localfile=globaldown.sh

if [ -f "$remotefile" ]
then echo "we have the file remote"
else echo nothing to download from remote server "$remotefile"
fi

if [ -f $localfile ]
then echo we have the local file "$localfile"
else echo "no local file"
fi
it is seeing the local file but not the remote file.

I can copy and past the "echo $remotefile" into my browser and the path is correct.

also wget will fetch the remote file so it should see that it exists.

View 3 Replies View Related

-bash: Updatedb: Command Not Found

Nov 1, 2007

I got problem when use locate and updatedb command:

-bash: locate: command not found

Quote:

[root@server ~]# locate httpd.conf
-bash: locate: command not found
[root@server ~]# updatedb
-bash: updatedb: command not found
[root@server ~]#

View 8 Replies View Related

REMOVING Site

May 26, 2007

I got this from my data center.

[url]

You will need to remove that html from your server.

how do I remove from server?

View 6 Replies View Related

Plesk 12.x / Linux :: Deny User Upload File Via File Manager Or Hidden File Tab?

Feb 10, 2015

I'm build Plesk Panel for Linux and Presence Builder, I don't want my user can upload their website to hosting via File Manager. How can I do it...

View 2 Replies View Related

Bash Script To Monitor 3 Or More Processes Via Cron

Jan 21, 2008

I have a bash script which monitors one process:

#!/bin/bash
sitepoint=`ps aux | grep -v grep | grep -c 'process'`
if [ $sitepoint -le "0" ]; then
command
fi

I wonder if it can be extended to monitor 3 processes than making 3 different scripts like that or some other solution for monitoring more than 1 process if it is running or dead.

View 6 Replies View Related

Removing Emails When Using IMAP

Sep 21, 2005

I know that the IMAP method has the sometimes useful feature of leaving the emails on the server when viewing using an email client like Outlook Express. However, in our case we were forced to use IMAP inorder to use AOL as our ISP and Outlook Express as our email client. Is there a way to have the emails removed from the server after downloading like a POP3 connection does?

The client fills up the mailboxes until the email stops working.

View 0 Replies View Related

Iframe Removing Script

Oct 7, 2009

any iframe removing script.

View 7 Replies View Related

Removing Apache Modules

Apr 17, 2009

I have a RHEL 5 server, that host one site with a common PHP 5.x -MySQL 5.x app, it also uses .htaccess to rewrite rules. I'm trying to optimize apache to the max, and though about removing some unneccesary modules. The actual modules loaded are:

Code:
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule evasive20_module /usr/lib/httpd/modules/mod_evasive20.so
LoadModule security_module /usr/lib/httpd/modules/mod_security.so
Besides of mod_evasive, mod_security that are security modules, what modules can I disable without causing any problems to a common PHP-MySQL website?

This is a plain RH box, virtual host is configured at httpd.conf in this way:

Code:
<VirtualHost SERVERIP>
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /var/www/sites/mysite.com
<Directory "/var/www/sites/mysite.com">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</VirtualHost>

View 4 Replies View Related

Removing Fiber By Cutting It

Jun 23, 2009

We have a large amount of multimode fiber coiled up under our raised floor that needs to be removed. The end that remains intact is running to a SAN cabinet that is very densely populated and our vendor has suggested cutting the fiber to make it easier to remove without disturbing the remaining active fiber.

Does anyone have any experience cutting fiber in a data center environment ?

Are glass fragments or any other debris a concern ?

View 6 Replies View Related

Completely Removing Site

Apr 29, 2008

I've removed a website from my server, terminated the account, removed all files. But when you go to the domain name, you get the "Great Success ! Apache is working on your cPanel® and WHM™ Server" page. I dont want even that. I want nothing to come up.

I want it to appear as if the domain/server never existed and show up as a 404 or whatever (this was a forced remove). Is there any way to do this? is there something I didnt do? Or am I stuck since the domain is still pointed at my server.

I've tried to give the hint (move), but it hasnt worked, so I have a feeling I'm going to get questions about this new issue. It's a church related group (even thought theyve been warned this was coming), so its hard to be an AHole, but they need to go.

I just want it to come up as if it never existed on my server, if possible.

View 5 Replies View Related







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