2
votes
1answer
2k views

How to apply du (f.x.) to all sub directories except for some of them?

./a |-/bx1 |-/by2 |-/bz3 |-/bx4 |-/by5 Now I want to apply du to all sub-folders except for /by2 and /bx4. I can make it happen for one folder: du --max-depth=1 --exclude=./by2 but not for ...
2
votes
1answer
607 views

Creating a linux user with limited privileges for ssh tunnelling

I am following this post to create ssh tunnel to mysql. The details description of my application scenario is given in my other SOQ. I exactly followed these steps to create a user: useradd -s ...
0
votes
2answers
620 views

Using grep to find first two numbers of IP addresses?

I'm trying to figure out how to use grep to pull out only the first two numbers of an IP address in a list. I've got a routine that is isolating the log entires (from Exim) that I need, now I just ...
2
votes
1answer
925 views

debian: remove all packages installed on a specific day

I have to remove all packages installed on a specific day. My solution is to look up the file /var/log/dpkg.log, find out the entry with the right date, extract the names of the packages and remove ...
0
votes
1answer
58 views

text replacing in data file with peculiar spacing

I have a text (.qdp) file with many data stored. In some rows, the data are too many to be on just one line. Then, the program that saves the data, use a minus sign (-) to go on the new line, and ...
1
vote
1answer
166 views

sending mail using telnet [closed]

I'm trying to send mail via the telnet command. I've looked at several tutorials online to use telnet <servername> 25. But I've tried telnet mail.aol.com 25 and it gets stuck on trying ...
1
vote
1answer
288 views

Understanding ls -l output

When I run ls -lrt command on a Unix folder , I get the following output MyServer> ls -lrt total 10 drwxr-x--- 3 UnixUser other 512 Jul 22 2011 FolderA lrwxrwxrwx 1 UnixUser other ...
3
votes
3answers
18k views

How can I remove the text from a line after a certain character with awk

How can I use awk to remove all text after a certain character ";" that appears on every line of my text file? (I then need to run for loops on the text) Jenny,Sarah,John;North Dakota ...
1
vote
1answer
332 views

How can I find out what options sudo is configured with?

Often when debugging issues with sudo I'll look at the options in the configuration file /etc/sudoers. However it can be difficult to know what options are enabled by default, since they're built into ...
1
vote
0answers
336 views

Ulimits and pam modules

Can you explain me the relation of ulimit setting on a proccess and line session required pam_limits.so in pam module. In wich modules i really require this line? I have this line in pam.d/su ...
0
votes
1answer
672 views

Dell D610 6.5 CentOS Installation - Undetected Network Adapters

I've spent the better part of the day attempting to install CentOS 6.5 on an older Dell D610 laptop, using everything from a Minimal Install to the Full DVD. After multiple attempts I was able to ...
1
vote
2answers
865 views

will tail with piping read whole file?

I want to read a big log file with 10000 lines everytime. and I use this command: tail -c +offset somefile | head -n 10000 my question is, with the piping of head, will tail read the whole file? ...
-1
votes
1answer
956 views

ffmpeg not found [closed]

As I had to install my system from scratch I decided to play it safe this time around and follow the documentation for compiling ffmpeg on Centos via the ffmpeg.org site. I followed every command line ...
0
votes
1answer
463 views

How do I set up a PostScript print queue to share a PCL laser printer and add PS fonts?

I would like to take a $100 PCL-compatible laser printer and hook it to my home network either through Wi-Fi or by connecting it directly to a Linux server by USB. Instead of using the ...
2
votes
3answers
330 views

List all word pairs that appear in a line together in a file

How can I use awk to run through a file written as: Sarah,Masha,Helen Connor,Jessica,Jennifer,Candace Betty,Sarah,Helen John,Harold,Frank,Daisy and put out all pairs that appeared in a line ...
1
vote
2answers
81 views

Automated test for install script

I'm writing an install script for an appliance that modifies system config files under /etc (amongst other things). How can I test this script non-destructively? Ideally I would like to run the ...
2
votes
1answer
493 views

How not to connect to disabled networks when no configured network is available

How can I make wpa_supplicant not connect to expressly disabled open networks when no configured network is available? (How can I make it not connect to anything whatsoever?) This happens when my ...
1
vote
2answers
201 views

Fastest way to create a file of 1MM unique nanosecond timestamps

My current (slow) example is this: for i in {1..1000000}; do echo "$(date +%s)$(date +%N)"; done > 1m-example.txt Hopefully there's a better way. It's crazy slow.
0
votes
1answer
1k views

CentOS 6.5 nmblookup not found

After installing Samba (yum install samba) on a fresh CentOS 6.5 install, I cannot run nmblookup ("command not found"). I also tried searching the file system and could not find it anywhere.
6
votes
2answers
219 views

What's the story behind command file's suggestion?

While I'm reading file(1) I noticed this in the man page (emphasis mine): When adding local definitions to /etc/magic, make sure to preserve these keywords. Users depend on knowing that all the ...
1
vote
0answers
428 views

Install Linux without USB or DVD?

I was wondering if there was a way to install Crunchbang on to my spare 1TB partition without using a USB or DVD while booted in Windows? I've Googled this plenty of times, but it usually just comes ...
3
votes
1answer
198 views

Is it possible to get file list, byte range from the head of a tar+bzip2 file?

Essentially, I'm hoping someone with an advanced knowledge of tar/bz2 can answer whether this is possible. The situation is that we have a periodic 24GB feed of data from a vendor, as a .tbz file. ...
0
votes
1answer
257 views

Linux drivers for Ricoh Aficio SP 100SU

Does anyone have a driver for the Ricoh Aficio SP 100SU on Linux? Any directions to correctly install it and have the printer work?
1
vote
2answers
917 views

Newly installed arch linux problems

First off, I've installed arch before, but managed to not encounter any of the problems I'm having at the moment (not sure how). But I'm well and truly stuck. First, my network interface is now called ...
0
votes
1answer
38 views

Linux Arch Unity not writeable settings

I am running Linux Arch with KDE till yet. Now I want to move to Unity because of some personal favors. I used the tutorial proposed in the arch wiki for installation (the recommended way using the ...
2
votes
1answer
115 views

Using FACLs to restrict default group but allow others

So, I'm running RHEL 6.x with acls enabled, etc. and I've been fighting this ACL issue for a bit now and I can't seem to get it down. I'm trying to make it so that: /var/www/html/* are owned ...
2
votes
1answer
134 views

In zsh, how can I dump all configuration?

How can I print my current configuration including defaults and key bindings? This would allow me for example, to find what action is bound to say ^P in emacs mode and find binding in vi mode or set ...
0
votes
1answer
44 views

curl does not return any thing for protected file

I have a file on the server that is HTTP Head password protected, but when I tried to get the page the command returned with nothing at all: curl --user username:password http://mysite.com
26
votes
3answers
8k views

Where are filenames stored on a filesystem?

Where are filenames stored on a filesystem? It's not in inode or with the actual file content since we have hard link that two filenames can point to the same inode.
0
votes
1answer
480 views

How to make a Fedora respin that has a custom program icon on its desktop?

I want to create a Fedora custom Live DVD that ships with an icon to a custom program (not in any repository, it's something I made) appearing on the desktop, ready to be executed by the user as soon ...
7
votes
2answers
703 views

How do I only undo pasted text in vim?

TL;DR; version - How do I undo text that was pasted in from my OS copy buffer without undoing other text that was typed in since I went into insert mode? Longer description: Put something in your ...
1
vote
0answers
33 views

Execute command when mouse is pluged/unpluged on GNU/Linux

Is it possible to have something like event handler for plugging unpluggig a mouse in Unix System? I want to have a script that will enable/disable touchpad but not only on startup (you can find ...
0
votes
1answer
294 views

understanding lsof -i output with web browsing

Sorry, if my question is nooby, but i don't understand some output lsof command. I try to run lsof -i on my home machine(debian linux) and what i obtain (showed one line; my browser chromium was ...
1
vote
1answer
1k views

Getting 'no such file or directory' even though the file is clearly there [duplicate]

I'm having a perplexing issue. If I try to run a script via: root@myServer:~/dig# ./minerd.sh I get: -bash: ./minerd.sh: No such file or directory If I try: root@myServer:~/dig# ~/dig/minerd.sh ...
0
votes
0answers
468 views

How do I emulate a USB stick with an external CDROM drive?

I am working with a Linux-based high-security network appliance (hereon: device) and do not have access to the user space so I can't log in. The only thing I can do is send it commands to upgrade ...
2
votes
2answers
400 views

Bash script to signal a concurrently running instance (same script) about a condition and increment counter

Background Here's what I want to achieve. I have a (potentially) long-running process. Now I have locking in place just fine and all is generally in order. However, since this is a scheduled job, ...
4
votes
1answer
577 views

Prey anti-theft configuration on Debian

I would like to protect my laptop from thieves. I would configure Prey, but I can't find any tutorial for Debian/Ubuntu users. I tried to go to the control panel on the project, but whenever I try to ...
2
votes
2answers
36 views

Debian listing packages that are recommended by already installed packages

As the tittle suggests: I'm looking for a way to list every package that is recommended by one of the packages that are already installed on my system. Kinda similarly to how apt displays recommended ...
2
votes
1answer
158 views

Should IP tables rules affect a serial port on Linux

I'm trying to setup some iptables rules on my embedded Debian Linux system, using a serial console I entered this: root@ts7600-47aad3:~# iptables -F root@ts7600-47aad3:~# iptables -P INPUT DROP ...
5
votes
2answers
187 views

How can I delete all unordered lines from a text file?

Overview Consider an ordered list interspersed with unordered elements, e.g.: Alligator Ant Falcon <-- Baboon Badger Armadillo <-- Caiman Cat How can this list be processed so that all ...
4
votes
4answers
2k views

How to sort a list of files by time, given only the filenames

Given a list of file names, how can I sort it by file modification time? The resulting output needs to look exactly like the input with the exception that the data has been sorted accordingly. Here ...
0
votes
1answer
1k views

Adding a second hard disk CentOS

I'm running CentOS on my VMware server console, and I want to know how to make a second virtual hard disk on which I can expand the size of the primary logical volume AND and a third to hold two ...
0
votes
0answers
595 views

Gnome and Gdm doesn't recognize my password

I installed Archlinux as Virtualbox's guest on Windows. After installation, I can not log in through GDM, though it lists my user name, and the root account doesn't work either. The error info ...
0
votes
1answer
450 views

Does ~/.bashrc set environment for users whose shell is /sbin/nologin?

I have an SFTP server and have set user shells to nologin to restrict access to SFTP. I want to set a conditional umask of 0002 so that newly created files are group writable for all SFTP users. Can ...
0
votes
1answer
101 views

Beginner's question: Accessing network location on domain

I'm new to Linux so this might seem a little naive! So, my computer is connected to a university network, in the computer science department. This domain is called "cs". However, "cs" is a subdomain ...
6
votes
1answer
739 views

What is the rationale for the bash shell not warning you of arithmetic overflow etc.?

There are limits set for the arithmetic evaluation capabilities of the bash shell. The manual is succinct about this aspect of shell arithmetic but states: Evaluation is done in fixed-width ...
2
votes
1answer
231 views

evince opens a new document to the last page

I have a postscript file (created using groff) which is a multi-page document. If I open it using ggv on Solaris 10 it opens correctly to page 1. When I open it using evince on Solaris 11 it opens ...
0
votes
1answer
844 views

Need to grant two users to an AIX server to just one folder [duplicate]

Ok, in our environment, most users (including myself as one of the unix admins) don't actually have admin rights directly on the aix servers. We login to a front unix server as ourselves without root ...
2
votes
0answers
490 views

IPtables rule to double NAT [closed]

Let me rephrase it.. I just need an IPtable rule to do double NAT-ting.. Host A - Host B - Host C - Host D Host B should do both source NAT and destination NAT, so that my request from Host A ...
3
votes
1answer
870 views

libata patch to allow disable sata port

My question is related to the patch introduced in this post How to tell Linux Kernel > 3.0 to completely ignore a failing disk? If the kernel is patched with this code what is the kernel parameter ...

15 30 50 per page