I once used gnome-mount like this
gnome-mount -o ro -d /dev/sda2 or gnome-mount -o ro -p "Macintosh HD"
But, alas, gnome-mount seems to be no more. RIP.
I can do this
gvfs-mount -d /dev/sda2
(which generates a whole lot of errors but does mount the partition in the /media directory.)
This is a related question: http://superuser.com/questions/131918/gnome-mount-alternative-in-ubuntu-10-04-or-how-to-mount-partition-with-normal-use
But how do you do it by name?
For example:
nginx and php-cgi are in the defaults run level, and they are not started yet.
What's the command to start them all, instead of starting then individually?
I know there is a command, but I totally forgot it.
Hi!
On several of the webservers i'm responsible for there's a javascript virus, a trojan downloader according to the antivirus i'm using. It's a minified javascript that's on the bottom of every page requested from the server. I don't know what the cause is. How can I prevent this from happening again?
Can anyone provide the tc command to limit upload bandwidth per user in Debian Lenny?
I found that to mark packets per user with iptables I can use the following command
iptables -t mangle -A OUTPUT -p tcp -m owner --uid-owner testuser -j MARK --set-mark 500
but I have no idea how to use tc
update
by running following commands, i managed to limit testuser upload bandwidth to 10Mbit
iptables -t mangle -N HTB_OUT
iptables -t mangle -I POSTROUTING -j HTB_OUT
iptables -t mangle -A HTB_OUT -j MARK --set-mark 30
iptables -t mangle -A HTB_OUT -m owner --uid-owner testuser -j MARK --set-mark 10
tc qdisc replace dev eth0 root handle 1: htb default 30
tc class replace dev eth0 parent 1: classid 1:1 htb rate 10Mbit burst 5k
tc class replace dev eth0 parent 1:1 classid 1:10 htb rate 10Mbit ceil 10Mbit
tc qdisc replace dev eth0 parent 1:10 handle 10: sfq perturb 10
tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10
now the problem is, i do not want to limit testuser's FTP bandwidth but by running above commands FTP speed also limited to 10Mbit.
Regards
I have a directly called /cache which has about a million files.
I restructured my caching system to put cache files into different folders, inside the /cache dir. new cache files are already being written to those sub-folders. So I want to remove all the files inside the /cache dir that are not in any subfolder.
How would I do this in SSH?
Sometimes, sending a SIGTERM to a process will cause it to send SIGTERM to all its child processes. However, sometimes this doesn't work.
Is there a command or a utility that will allow me to kill a process and all its child processes at the same time? I usually resort to manually collecting all the pids into one kill command, but it feels stupid.
This SO question asks how to do this with perl, but anything that gets the job done would be great.
Hi,
I am creating a script to sync my important documents between two system. I want my script to generate a log file for the last action. can you suggest me a way to achieve this.
Question: If I execute the rsync command with -v flag, it will print a lot of messages on the console. Is there any way. So, I can redirect these logs to a file?
dear sir,
please help me i have reliance bandwidth connection & i want to set local area network without use a router please help how set this
with regards
ritesh rana
[email protected]
I am trying to find a workaround for incorrect grouping of windows in Docky, and I believe the problem lies with the WMClass attribute that is set for each window. However, I do not know how to view this attribute for open windows. Is there any way to do this?
I'm just wondering what the limits for time are. I have a program that always takes exactly 20 ms, so I assume this is the lowest it can measure, but I want to see if there's some sort of documentation of this.
I need to organise an external HDD such that there is no more than 500 folders on it.
Ubuntu's "Properties" pane shows only the file count, not the folder count.
Is there a simple CLI line that will tell me the number of subdirectories?
Thanks!
Within our co-located networking closet, we have control over two ranges of 254 addresses, e.g. 64.123.45.0/24 and 65.234.56.0/24. The problem is, if a host has only one IP address, or a block of addresses in only one range, it can't contact any of the addresses in the other subnet.
All of our hosts use our hosting provider's respective gateway, e.g. 64.123.45.1 or 65.234.56.1
A host on the 64.123.45.0/24 range can contact the 65.234.56.1 gateway and vice-versa
Everything in our closet is connected to an HP ProCurve 2810 (a Layer 2-only switch), which connects through a Juniper NetScreen-25 firewall to the outside world
What can I do to enable communication between the two ranges? Is there some settings I can change, or do I need better networking equipment?
I often find myself opening several ssh connections in order to view several log files at a time with tail -f.
This isn't a problem when I'm at home because I use public key encryption for password-less login. However, I will often use computer at my university to do this so I don't have the option of using my private key. It gets annoying to enter my password 4 or 5 times to get several terminal windows.
How can I get multiple terminals over a single connection?
I am dealing with an issue I am unclear on how to resolve and have been pulling my hair out for some time. I have been trying to configure an FTP user using the following (we use this same documentation on all servers)
Install FTP Server
apt-get install vsftpd Enable local_enable and write_enable to YES
and anonymous user to NO in /etc/vsftpd.conf restart - service vsftpd
restart - to allow changes to take place
Add WordPress User for FTP access in WP Admin
Create a fake shell for the user add "usr/sbin/nologin" to the bottom of the /etc/shells file
Add a FTP user account
useradd username -d /var/www/ -s /usr/sbin/nologin
passwd username
add these lines to the bottom of /etc/vsftpd.conf
- userlist_file=/etc/vsftpd.userlist
- userlist_enable=YES
- userlist_deny=NO
Add username to the list at top of /etc/vsftpd.userlist
restart vsftpd "service vsftpd restart"
make sure firewall is open for ftp "ufw allow ftp" allow
modify the /var/www directory for username "chown -R
/var/www
I have also went through everything listed on this post and no luck. I am getting connection refused.
Sorry for the poor text formatting above. I think you get the idea. This is something we do over and over and for some reason it is not cooperating here.
Setup is Ubuntu 12.04LTS and VSFTPD v2.3.5
Thank you in advance.
Hello, I'm willing to build a minimal kernel with only the needed things for my machine; so I started by compiling the kernel from the ground up, using the default configuration and adding things that I know for sure I have (i.e.: Ethernet card, WiFi card, ...).
But there are several other things not so easy to know about (i.e.: the watchdog timer) so I came across AutoKernConf which supposedly detects the hardware of the machine and generates a kernel configuration file with the settings for the found devices.
The problem is it contained several settings repeated and even some which I don't have (I'm using a Dell laptop and one of the things it "found" was something of a Toshiba one).
So I ended up building a kernel with the configuration that came out of the make allmodconfig command, which is a kernel with most of the things compiled as modules.
Booting into that kernel and running lsmod I can see all of the kernel modules in use (the ones really needed) and I would like to know if there is a tool or some way for me to parse that list and convert it to the corresponding kernel configuration file.
Or how to map each one with the appropriate options in the kernel so that I can manually set them.
Thank you very much for your time.
I'm a programmer trying to fill a big hole in my understanding of networking basics. I've been reading a good book (Networking Bible by Sosinki) but I have been finding that there is a lot of "assumed" information contained, where terms/concepts are thrown at the reader without a proper introduction to them.
I understand that a "route" is a path through a network. But I am struggling with visualizing some routing-based concepts. Namely:
How do routes actually manifest themselves in the hardware? Are they just a list of IP addresses that get computed at the network layer, and then executed by the transport?
What kind of data exists in a so-caleld routing table? Is a routing-table just the mechanism for holding these lists of IP address (read above)?
What are the performance pros/cons for having a static route, as opposed to a dynamic route?
I'm serious - is it really fun for *nix sysadmins spending half of their life on spotting typo in httpd.conf ? What not use xml or json - (write gui tools would be easy)
For example, if I have a directory containing files file1 and file2, and a directory dir1, then "ls -l file1" will show details just for file1. Doing the same thing for dir1 will instead show the contents of dir1. Is there a way to treat dir1 like file1?
I have a Quad-core/8GB Vista Enterprise 64-bit (SP2) installation on which I installed Virtual PC 2007.
I have a problem that is opposite of all that I found searching around the Internet--everybody has problems making network connections from their guest VM.
When Virtual Machine Network Services is enabled in the protocol stack for my network card across a reboot, it causes access problems to the network. The amount of time to login in using a domain credentialed account is upwards of 3 minutes, then after reaching the desktop the network and sharing center shows that my connection to the domain is unauthenticated.
Disabling and re-enabling the Virtual Machine Network Services (uncheck in network properties/apply/recheck/apply) fixes the problem. And as long as I have the VMNS disabled when I shutdown the restart runs smoothly. I just have to remember to enable after login and disable before shutdown.
I have un-installed and re-installed Virtual PC 2007 multiple times with restarts between. The install consists of the SP1 + a KB patch for guest resolution fix.
Any help would be greatly appreciated.
Some additional information...
At one point during my hairpulling and teethgnashing with this, I tried to ping my primary DC and observed some weird responses: (Our DC is 10.10.10.25, my dynamic IP was 10.10.10.203)
Reply from 10.10.10.203, Destination host unreachable.
Request timed out.
Reply from 10.10.10.25: ...
This is not consistently repeatable, but thought it might strike a chord with someone.
I bought a VPS server yesterday. Server companies support is not avaible for now. I am going to set dns adress. So i know 1 ip number they gave to me, how can i learn how many ip's i have and what are they? Is there command for ubuntu for that? Or any other way?
I'm looking for a simple method that will log file system operations. It should display the name of the file being accessed or modified.
I'm familiar with powertop, and it appears this works to an extent, in so much that it show the user files that were written to. Is there any other utilities that support this feature.
Some of my findings:
powertop: best for write access logging, but more focused on CPU activity
iotop: shows real time disk access by process, but not file name
lsof: shows the open files per process, but not real time file access
iostat: shows the real time I/O performance of disk/arrays but does not indicate file or process
I have the following command that lists all files with the extension doc, docx, etc.
find . -maxdepth 1 -iname \*.doc\*
The command returns numerous files some of which I would like to delete. So for example the results returned are
Example.docx
Dummydata.doc
Sample.doc
I would like to delete Sample.doc and Dummydata.docx. How do I delete the files using the -exec option. Am I able to pass in the names of the files e.g. rm Dummydata.docx Sample.doc hence the command would look as follows
find . -maxdepth 1 -iname \*.doc\* -exec rm Dummydata.docx Sample.doc
Can I pass the names of the files within {} afterrm`? e.g.
find . -maxdepth 1 -iname \*.doc\* -exec rm {Dummydata.docx} Sample.doc
Is there a better way of doing it?