3
votes
3answers
3k views

How is paging managed in the absence of swapping?

How is paging managed in the absence of swapping. If that is the case, how will a page fault be managed? What I meant is, if there is no availability for swapping, then how is Paging managed. I ...
3
votes
1answer
141 views

how to deal with arguments when executing a script

how to deal with arguments when executing a script my code is: #!/bin/bash DIR="$1" if [ DIR eq $1 ] then echo -n "total directories:" ; find $DIR -type d | wc -l echo -n "total files:" ; ...
3
votes
1answer
1k views

How to find files that contain newline in filename?

I am trying to find files that have a newline in the filename. But I can't figure out what pattern to use. The following works, but is not very useful if I want to use it in indented code. find . -...
3
votes
2answers
318 views

Where should I copy-paste-install software to?

I'm installing IntelliJ, and the readme tells me to choose an installation folder. Where is a good, standard place to put installed programs?
3
votes
2answers
543 views

Create custom wordlist

I want to create a custom list of (scientific) words for purposes like spell checking and OCR based on my collection of scientific papers in pdf format. Using pdftotext I can easily create a text file ...
3
votes
2answers
7k views

xfce: Allow shutdown for non-root users

How do I allow shutdown for normal users in xfce? Currently, the log-out/restart/shutdown box only allows the log-out option, and having to switch to the console, logging in as root and shutting down ...
3
votes
1answer
343 views

Escaping quotes for scp

I needed to write a that behaves correctly with nasty (spaces, braces, etc..) filenames. scp -rv "$1" shiny:/Volumes/Seagate3To/\"$1\" This function works, but I don't understand why the quotes ...
3
votes
1answer
3k views

How to move file based on file name expression using shell script?

I want to achieve the following using a shell script. When a script is called with a file as a parameter, it should move the file based on a portion of its name. For example, "Car insurance ...
3
votes
2answers
2k views

dumpe2fs - lifetime writes - what is it

For example, if I run: sudo dumpe2fs /dev/sda1 I get detailed information about the partition. I'm confused about this part, Lifetime writes, returns the following for my boot partition: Lifetime ...
3
votes
3answers
1k views

Avoid pause during dm-raid initialization

On my CentOS 5 workstation I get a few seconds wait after dm-raid45 has been loaded ("Initializing Driver" or something like that). This seems to be part of the initrd. After that the system boots up....
3
votes
2answers
78 views

How to prevent FreeBSD from disconnecting a drive device?

While accessing a drive with high error rates (as, for example, here for opensuse) in FreeBSD, the system eventually disconnects the drive and it disappears from /dev. This makes it impossible to run ...
3
votes
3answers
202 views

Search a directory recursively for files listed in a csv, and copy them to another location

I have a directory (let's call it "Movies") which contains many files and folders. I have a long list of file names in a .csv file (around 4000 entries) which refer to files which are located ...
3
votes
1answer
135 views

Different write behavior for owner and member of group despite 775 permissions

I have mounted a remote share via my fstab using the line: //path/to/target /media/f cifs gid=<mygroup's id>,dir_mode=0775,file_mode=0775 0 0 As a result, everything under /media/f winds up ...
3
votes
3answers
7k views

Compare two files for matching lines and store positive results [duplicate]

I have two files. File 1: A0001 C001 B0003 C896 A0024 C234 . B1542 C231 . upto 28412 such lines File 2: A0001 A0024 B1542 . . and 12000 such lines. I want to compare File 2 against File 1 ...
3
votes
3answers
241 views

Permissions for a submission script

I'm a TA for an introductory Python programming class (all work is done from the terminal), and I'm writing a project submission script. Ideally I want a directory setup like this: submissions/ ...
3
votes
0answers
185 views

Run systemd service after automount but after it's accessed

Is it possible to run a systemd service that prepares an automounted file system for use? This service would need to run after the filesystem is mounted, but before whatever triggered the automount ...
3
votes
1answer
6k views

ElementaryOS Gala using more than 100% CPU constantly

I am using ElementaryOS with the default Drivers and my Gala process is constantly using tons of CPU (sometimes more than 200%). I have looked everywhere but couldnt find a solution. I tried to ...
3
votes
1answer
436 views

Getting size of directories and exclude some folders

I have an directory structure like this: application1 application1_edit application2 application2_edit Is there any way to get the total size for every folder (including sub-directories) and ...
3
votes
1answer
190 views

What is the purpose of abstractions, session, session leader and process groups?

I understand from Informit article that sessions and process groups are used to terminate descendant processes on exit and send signals to related processes with job control. I believe this ...
3
votes
2answers
63 views

Who is creating Documents/Video/Pictures/etc. in home directory

I had Ubuntu-14.04 installed in a minimum configuration, i.e. with no X Windows support. Later I added x-server packages for my card, and a lightweight WindowManager (I don't want KDE or GNOME), so I ...
3
votes
1answer
259 views

What is the difference between letting nohup append to 'nohup.out' and explicitly redirecting it to a file?

Consider the following scenario: tail.sh: #!/bin/bash tail -f test.txt invoke.sh: #!/bin/bash nohup ./tail.sh & invoke_explicitredirect.sh: #!/bin/bash nohup ./tail.sh > out.log & ...
3
votes
4answers
10k views

How to find executable filetypes?

I want to find file types that are executable from the kernel's point of view. As far as I know all the executable files on Linux are ELF files. Thus I tried the following: find * | file | grep ELF ...
3
votes
3answers
5k views

Yum regular expression or wildcard search?

Fedora documentation says: 5.2. Advanced Searches If you do not know the name of the package, use the search or provides options. Alternatively, use wild cards or regular expressions with ...
3
votes
2answers
7k views

debian, problem with DNS

When I type in "google.com," firefox tells me that the server is not found. When I type in the IP address of google, it works just fine. I was playing with this computer at another place and it didn'...
3
votes
4answers
3k views

How can I copy text from xterm (Awesome, Debian, VirtualBox)?

I ran the minimal Debian installation inside a VirtualBox instance, installed X11 and Awesome window manager manually (without any custom configuration yet) and installed VirtualBox additions as well (...
3
votes
2answers
2k views

Linux on Hard Drive Partition, Bootloader on USB Flash Drive

How can I use a USB flash drive to boot Linux from a partition on (another) hard drive? I'm trying to install Linux on an encrypted partition on the hard drive (using LVM on LUKS). Since /boot must ...
3
votes
3answers
2k views

Which is a better way to search- find with regex or find with grep?

Of these two ways of searching a file recursively in all the subdirectories, which is faster / better ? find . -regex ".*/.*abc.*" or find . | grep ".*abc.*"
3
votes
1answer
3k views

Remove Text from Active Programs in Panel

In the panel, how can I remove the text next to the icons of my active programs? All I want to show is the icon. Specifically, in the example below, I want to get rid of where it says "Disc...", "p2-...
3
votes
1answer
9k views

How to properly automatically/manually rotate log files for production Rails App

I am taking over administration for a server which has a custom made 3rd party Rails app. The app developer informed me that the ruby log files are getting large and pointed me to the following link: -...
3
votes
1answer
705 views

How do I use capsh: I am trying to run an unprivileged ping, with minimal capabilities

I am experimenting with capabilities, on Debian Gnu/Linux. I have copied /bin/ping to my current working directory. As expected it does not work, it was originally setuid root. I then give my ping ...
2
votes
0answers
1k views

How to create the framebuffer file node?

I'm working with a limited embedded device - Linux environment - that uses a custom DirectFB implementation to draw a user interface in its video output. I would like to exchange this method by a raw ...
2
votes
1answer
538 views

How to make PulseAudio and OSS only applications coexist on Debian Wheezy?

Before I fell back to ALSA, I had severe problems with PulseAudio deadlocks for years on my Debian system on which I am using some OSS only (requiring /dev/dsp) applications. I would like to see ...
2
votes
2answers
5k views

“lsmod |grep audio” doesn't return anything?

I am running Debian Squeeze. I installed and removed Gnome3 and reinstalled Gnome2.x (epic fail and stupidity) and in the process I have lost audio, lspci returns following # lspci | grep Audio 00:...
2
votes
2answers
2k views

how to add line in a /etc/sudoers file with the help of shell script (50servers)?

Anyone can help me with shell script, I want to know script which can edit /etc/sudoers file and let me add {{{{{userid ALL=(root) ALL}}}} to 50 server I have on same network?
2
votes
2answers
2k views

Make does not compile modules. Error: Building modules, stage 2. MODPOST 0 modules

I have banana pi and installed debian with kernel 3.19.3-bananapi from http://www.igorpecovnik.com/2014/09/07/banana-pi-debian-sd-image/ So I want to compile a module so I downloaded kernel from ...
2
votes
1answer
1k views

Can one disable tap-to-click in X server configuration, without synclient?

I want to configure my system so that tap-to-click is disabled on the touchpad. (It's running a rather old version of ALTLinux distro with xorg-server-1.4.2-alt10.M41.1.) The most popular advice I ...
2
votes
2answers
341 views

What is the equivalent of apt-file in portage, if any? [duplicate]

Hunting for dependencies when compiling software from the scratch is practically unavoidable. In Debian-based Linux distributions which use the apt-get utility to manage packages, there is also a nice ...
2
votes
4answers
7k views

Unable to boot the operating system

I installed Lubuntu 11.10 and it run without problems. I decided to install Ubuntu 11.10 mini instead of Lubuntu 11.10. After the installation the operating system didn't boot. I only saw the black ...
2
votes
2answers
230 views

How do you get a count of all file extensions on a hard drive using the gnu+linux terminal? [duplicate]

On windows I have a program that can count all the files on a hard drive and the output shows a list of file extensions and a number (which showed how many files on the drive were for example are jpg)....
2
votes
1answer
2k views

How can I get full Unicode font coverage for Gentoo Linux?

I've installed over 159 new fonts, all that were possible in Gentoo mirror. But even then, gnucharmap doesn't have: Arabic mathematical alphabet symbols 01ee00 1eebb Arabic Extended-A ࢠ ࣾ Chakma ...
2
votes
1answer
180 views

How can I configure a set of computers to netboot?

I have a number of machines which I'll be deploying in the near future. As suggested here, I could use network booting to get these computers online without even having a hard disk in them. According ...
2
votes
2answers
273 views

Take copy of TTY0 text

I have some output in TTY1 that I think might hold clues as to why my last GUI session froze (CtrlAltBackspace was able to get me back to the terminal and I reloaded the GUI). However, I cannot seem ...
2
votes
1answer
620 views

how to Connect to Mysql only once?

I have created a shell script to connect to a DB and INSERT IPs and MACs from dhcpd.log file the scripts worked properly: #/!bin/bash #Defining Variables dhcpLogFile="/var/log/dhcpd.log" #Begin Code ...
2
votes
3answers
2k views

How can I securely login remotely to my Linux box over the internet?

I'm pretty much a Linux beginner, but this question has been on my mind. What's the simplest, most secure way to connect to my computer at home from work or from the library, &c? I'm running Mint ...
2
votes
1answer
4k views

Return code for curl used in a command substitution

I've script as below :- (edited) httpUrl="http://www.nnin.com" rep=$(curl -v -X POST -d "UID=username&PWD=pass" $httpUrl) status=$? if [ "$?" -eq 0 ]; then echo "Success" exit $status ...
2
votes
1answer
329 views

Command to monitor elapsed time in background?

I've been trying to find a decent way to monitor elapsed time in the shell. Basically, I'm asking for a stopwatch. The end result is easy enough to accomplish; I've seen examples of using time read, ...
2
votes
1answer
969 views

What are the default Polkit privileges on Arch Linux for shutdown, halt, etc., and why are they so?

On Arch Linux, with systemd, the following commands are all symlinks to systemctl: /usr/bin/telinit /usr/bin/poweroff /usr/bin/runlevel /usr/bin/reboot /usr/bin/halt /usr/bin/shutdown I find their ...
2
votes
2answers
129 views

how to count number of differences in large streams quickly?

I want to count the number of differences (different bytes) in two large streams (devices/files). E.g. two hard disks, or one hard disk and /dev/zero. The program(s) involved must be fast, as fast ...
2
votes
2answers
3k views

wpa_supplicant nightmares

i have been fiddling with wpa supplicant for days now and i've finally come to the point where i can't find any new leads on google. so here is the problem: i just installed a new tp-link tl-wn881nd ...
2
votes
2answers
4k views

Concatenate multiple files under subdirectories

My directory structure is given below x:\Project_2012-158A\Sample_4041 SampleSheet.csv 4041_CGTACG_L002_R1_001.fastq 4041_CGTACG_L002_R2_001.fastq 4041_CGTACG_L006_R2_001.fastq ...

15 30 50 per page