Skip to main content

All Questions

Tagged with
1 vote
2 answers
2k views

IPTables - Allow (ACCEPT) specific IPs within a blocked (DROP) subnet

I'm fairly new to IPTABLES, but I've written a script that blocks several of Amazon EC2's IP ranges from an input file, blacklist.txt: ... 54.66.0.0/16 54.67.0.0/16 ... I also have a separate ...
QNeville's user avatar
2 votes
4 answers
4k views

Cannot chroot /mnt/sysimage After Putting New Image on HP Computer

I am using Clonezilla to put a new CentOS 7 image on our computers. Most of them are Lenovo desktops, and we have a few HP desktops that are all currently running the old image. In order for the new ...
snowfi6916's user avatar
0 votes
1 answer
457 views

What is the behavior of mv on /?

One of our users accidentally performed mv /* ../ without root permission. After checking the effects using diff I was surprised to find that mv apparently functioned as cp when applied to the / dir. ...
doliv071's user avatar
1 vote
1 answer
3k views

upload file to ftp using bash script Linux

I know this is a pretty simple question but unfortantly I can't find any solution for my problem. I have file called: x.txt inside the root directory /x.txt. And I want to upload the file into my ...
Itzik.B's user avatar
  • 51
0 votes
1 answer
436 views

Run jpegoptim in a cronjob once a week, on CentOS from within cPanel, only for files added within the past week?

I've installed jpegoptim and can manually run it via the SSH command line: jpegoptim *.jpg --strip-all I'd like to take that command line and put it into a Cronjob that runs once a week. I'm running ...
janderson133787's user avatar
0 votes
1 answer
243 views

Why is this simple cronjob not running and how do I check the relevant log files?

I have an 'R' script that I wish to run at 00:30 every day, that is, 12:30 AM everyday. The script itself is located in ~/Desktop/foldername/runme.r and which Rscript tells me that the exact path to ...
learnerX's user avatar
  • 394
0 votes
2 answers
1k views

cron job on centOS 6.5

I have used these 2 references to insert a new crontab entry. redhat ubuntu I have created a new bash file and moved it to /usr/bin. That sh file has execute permissions for the root user and the ...
bwfrieds's user avatar
  • 101
2 votes
1 answer
7k views

Linux - create screen as another user

I'm trying to create a new screen on my server (CentOS 5.11), but instead of starting it with my user, I would prefer to use another user with restricted permissions, just to be on the safe side. So, ...
Octal's user avatar
  • 131
5 votes
1 answer
10k views

Whitelisting commands a user can use with sudo

I've been attempting to set up a whitelist of commands a user can run on my system. The server I'm using is running CentOS 7. What is the syntax that should be used to only allow a certain group of ...
edrw's user avatar
  • 153
2 votes
1 answer
6k views

bash: /home/user/.bashrc: Permission denied when try to change user from root to user

I'm on centos, when I login as root and use su x to change user to x, it shows this: bash: /home/x/.bashrc: Permission denied I try to source ~/.bashrc but nothing changes and I also tried following ...
Mairon's user avatar
  • 131
1 vote
0 answers
51 views

CentOS - using PXE to install it on my host ( kickstart configuration )

I am trying to install an OS from our server through PXE ( Preboot Execution Environment ). However, on my host, I have two disks say A ( /dev/sda ) and B ( /dev/sdb ) The default installation path ...
user3815726's user avatar
2 votes
1 answer
122 views

Running a process in the background using &

I have created the following script: #!/bin/bash while : do echo "1" >> test.txt sleep 1 done If I run the command using ./exm.sh & it runs on the background as expected and it ...
Nereo's user avatar
  • 21
-1 votes
2 answers
293 views

formatting output in bash shell to remove special characters - linux

I am issuing the command below against a logfile grep "Oracle Audit" /var/adm/messages | awk '{print $6}' How do I format the below output Audit[9460]: Audit[10507]: Audit[10507]: Audit[10507]: to ...
Noob's user avatar
  • 1,625
0 votes
1 answer
12k views

-bash-4.2$ for command line?

I don't know why when I SSH with putty onto my VPS, my command line starts with: -bash-4.2$ It hasn't ever been like that, it was myname@localhost Only thing I have done different in the last 24 ...
Centos User's user avatar
1 vote
1 answer
474 views

redirection - why it doesn't work this way

I know there are 3 streams attached to a process when it is run namely the input, output and error stream. And redirection execution work from left to right. I intend to execute a command, redirect ...
Noob's user avatar
  • 1,625

15 30 50 per page