0
votes
2answers
529 views

source script as command [closed]

For some reason (?), often when I write scripts nowadays they do not work, or work only in part, and then I try with . or source and they work perfectly. I'm unsure what is causing this as the scripts ...
1
vote
0answers
498 views

Partition wiped out possibly due to the partition table changed by Windows, malicious software, or …?

When the data loss problem occurred: My Lenovo laptop has both Windows 7 and Ubuntu 12.04. There are two ntfs partitions shared between the two OSes: one for Windows 7 installation ,and the other for ...
1
vote
3answers
3k views

Root permission - username ALL=(ALL) ALL does not work

I'm a beginner. I'm trying to give my user root permissions, so I edited the sudoers file like this: black ALL=(ALL) ALL "black" is my username. But I still don't have root permissions, and ...
1
vote
0answers
25 views

Rescale a PDF file [duplicate]

Possible Duplicate: How to change height and width of each page of a pdf Is it possible to rescale a PDF file (retaining perspective) to be within a maximum width / height? Rendering to an ...
3
votes
1answer
736 views

Implementing a String -> PDF Stamp tool

I wrote a little shell function which creates a fixed-size PDF file (A4) from a character string using gs: make_stamp() { file=$1 string=$2 tmp=${file}-small.pdf gs -o "$tmp" -sDEVICE=pdfwrite ...
3
votes
3answers
111 views

Stop user being able to access live CD environment or recovery mode?

I'm haved created an account on ubuntu that is just a standard user but with no internet access. I have also removed 'recovery mode' from the grub menu so that one cannot just choose this option ...
6
votes
2answers
2k views

How to modify write permission on current buffer in emacs?

Is it possible to change the write permissions on a file from inside emacs, without killing/re-opening the buffer? Sometimes I forget to modify the permissions on a file before opening it. I can ...
5
votes
5answers
2k views

How to setup password-less ssh with RSA keys

I am trying to setup a password-less SSH configuration between two machines and am having trouble. There are a ton of howtos out there that I have followed and have had no success. Here are ...
2
votes
1answer
166 views

How to put “glue” CWD (etc.) to part of the screen instead of putting into PS1?

I suspect there’s some terminology for this question that I’m not aware of. It’s hard to check if a question has already been answered if one doesn’t know the proper vocabulary. So, sorry if this is ...
4
votes
3answers
583 views

Use command grep and locate

How I can make the grep command locate certain words in the files specified by the routes found by the locate command? locate my.cnf | grep user (I want that grep command search the word "user" ...
1
vote
1answer
80 views

Rebooting makes me lose my password-less keys on other machines

When I reboot my machine (as I did today) I seem to lose some functionality, specifically my previous ssh keys that I had copied over to other machines that had allowed me to login without a password ...
9
votes
4answers
8k views

Find only destination of symlink

For use in a shell-script, I'm looking for a commandline-way to get the destination of a symbolic link. The closest I've come so far is stat -N src, which outputs src -> dst. Of course I could ...
3
votes
1answer
90 views

start rsync download before upload completes

I'm uploading a file via rsync from my local machine to a server so that a colleague can download it to his machine. Normally I would notify him to start downloading when the upload is complete, but ...
2
votes
0answers
894 views

Linux bridge blocks UDP packet from tap interfaces

Introduction: I'm working on a 6lowPAN projects of Wireless Sensor Networks. Basically, I have a set of nodes (Contiki OS) which are running on a linux host. Each nodes have its own tap interface ...
2
votes
2answers
706 views

Putting Linux processes on certain CPU cores [duplicate]

Possible Duplicate: How can I set the processor affinity of a process on Linux? Computer CPUs have many cores insde them nowadays. I have always wondered if there is a way to, when I start ...
8
votes
2answers
3k views

Adding a new System call to Linux 3.2.x with a loadable kernel module [closed]

I want to add a particular new system call in the linux kernel 3.2.x but as a loadable kernel module (as I don't want to recompile the kernel again and again) I read through many posts on internet ...
-3
votes
1answer
136 views

Is there a way to create a directory structure and files inside a file on a 'base' filesystem'?

Current scripts create and delete multiple files over NFS. I have been told that this is the problem, so was thinking if the run directory the script ran in looked like a single file to NFS then I ...
27
votes
1answer
55k views

How to write startup script for systemd

I have 2 graphics cards on my laptop, one is IGP and another discrete, I've written a shell script to to turn off discrete graphics card. How I can convert it to systemd script, to runt at start-up?
3
votes
1answer
197 views

grep for n or more periods on a given line

I want to be able to arbitrarily match lines that contain a lot of periods, like this: $ echo "there's. someone on the wing. some. thing." | grep -stuFF [[:idunno:]]{4,} there's. someone on the wing. ...
14
votes
2answers
15k views

How to avoid apache reload when rotating logs?

I use logrotate to rotate Apache access-, error- and rewrite-logs. My config file looks like this: /apache/*log { compress dateext rotate 365 size=+300M olddir /log/old/apache ...
2
votes
4answers
4k views

Is there an Arch based live persistant distribution?

I'm currently installing Archlinux on my new computer but Windows seems to be installed using UEFI and I'm quite in a rush right now and I don't have time to install Archlinux using EFISTUB or ...
5
votes
4answers
2k views

GUI input for shell script

I have a shell script which installs a program in RedHat. I need to add a GUI for entering some parameters so that it looks like an installation wizard . I tried Xdialog, Zenity, and Yad, but they ...
5
votes
1answer
124 views

Why do some of my lvm partitions have “-real” appended to their names?

In the /dev/mapper directory I can see my lvm partitions, but then I'll see some other ones with the same names, but with "-real" appended to them. What's that about?
3
votes
1answer
4k views

How should one change the width of scrollbar?

I started using Linux Mint 13 Mate a few days ago and I can't find anyway to change the width of my scrollbar, no matter it is firefox, chrome or File Manager. I tried to search google with "Linux ...
3
votes
5answers
2k views

Need to grep file with specific letter and move to another folder linux

I need to select files which contain "Error" or "traffic" in their names, e.g. abc_ERRor.csv raError.csv bsn_Error.csv bbbctraffic.csv ccc_traffic.csv ... and move them into corresponding ...
2
votes
1answer
173 views

Can I lock the root account during an install of Debian GNU/Linux 6 “squeeze”?

By default, Ubuntu locks account root; can I do the same, in Debian GNU/Linux 6 "squeeze", during install?
2
votes
1answer
961 views

su-to-root fails when root user locked?

How might I use script /usr/bin/su-to-root after I have intentionally locked the root account? Running Debian GNU/Linux 6.0.5 "squeeze" and noticed menu item "System > Administration > Synaptic ...
4
votes
2answers
111 views

How do I find a tag that contains a commit?

I have the SHA ID of a commit that I am interested in and would like to know how to find the first tag that contains it.
2
votes
2answers
273 views

cp file device:directory on Minix

In my operating systems class we had to modify the boot screen of the Minix OS. I understood just about everything we did, but at the end of the make for compiling the new OS, there's a line: cp ...
1
vote
1answer
83 views

PS tags does not work

I run a ps command inside a startup script, if I put in: ps -A -o euser,pid... I get this output: EUSER PID CMD %CPU RSS SZ ELAPSED root 644 ./code ...
2
votes
1answer
553 views

Command substitution: file or command not found

The following script #!/bin/bash QUERY='select * from cdr;' MYROWS=$("sqlite3 -list -nullvalue NULL -separator ',' /var/log/asterisk/master.db '${QUERY}'") gives me ./bla.sh: row 35: sqlite3 -list ...
10
votes
1answer
10k views

Group within group file permissions

I tried finding this on here, but couldn't so sorry if it's a duplicate. Say I have 2 groups and a user: group1, group2, user1 with the following structure: group1 is a member of group 2, user1 is a ...
1
vote
1answer
648 views

Make bluetooth device invisible / disable incoming pairing

I am using the bluez package for my bluetooth usb dongle on ubuntu server. I want to be able to initiate bluetooth connection from the dongle to a device, however a device itself shall not be able to ...
1
vote
1answer
244 views

Problem after deleting a system partition on another HD

While installing Debian Wheezy, I decided to use my another HD as /home/igor/Documents/, and the system installed correctlly nothing wrong happened, but later I decided to delete that partition so I ...
0
votes
2answers
252 views

Total RAM used by a program with `ps`? [duplicate]

Possible Duplicate: Measuring RAM usage of a program I am trying to use ps to benchmark a program, I'm just not sure which flags to use. I would like to get the amount of RAM the program ...
2
votes
1answer
139 views

Expanding a partition in Ubuntu

This is what GParted displays about my partitions. And this is the output from df: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 61409452 4503052 53786836 8% / udev ...
2
votes
1answer
813 views

Synchronous notifications with notify-send and xfce4-notifyd?

The title of this question is really self explanatory. I intend to send synchronous volume notifications in arch(changing volume and showing the progress bar) and was wondering if I can do this with ...
3
votes
2answers
252 views

Add info under specific line

I want to know how could I add files contain information under specific line in file. For example, I have file1.txt with the following lines: line 1 line 2 line 3 and file2.txt has the ...
2
votes
1answer
650 views

Parsing SQLite output

Using -line Option I get this output from SQLite: row1_column1 = valueA row1_column2 = valueB row2_column1 = valueC row2_column2 = valueD So one line for each column value and result rows are ...
2
votes
2answers
536 views

Import single rows from SQLite to MySQL?

I need to do some kind of incremental import again and again from a SQLite 3 database to a MySQL database. Column names are the same in both databases. Is there a good way to do this by a script ...
3
votes
1answer
2k views

How to get wireless access point information from MacOS terminal

I'm trying to gather information about surrounding access points but can't find the right tools to do that. For Linux there are tools like iwconfig and iwlist, but it looks like they are not ...
2
votes
3answers
4k views

Chinese input in Linux Mint 13

I started to use Linux Mint 13 MATE a few days ago. What frustrates me most is that I can't found anywhere to change my input language. In Windows, it is easy, just Ctrl+Shift. How can I configure the ...
10
votes
1answer
4k views

Load Linux bzImage in QEMU?

I compiled a Linux by doing make menuconfig then make and now I have compiled the most recent version of Linux. How can I load the kernel into QEMU?
5
votes
1answer
648 views

Emacs simple arithmetics in query replace

Is it possible to do the following in emacs: Query replace all numbers in a region by the number +n, for example if you have: 12 and 7 are nice numbers let n be 3, then it should transform to 15 ...
4
votes
1answer
2k views

System freezes. Can't find anything in the logs

My linux desktop system freezes (aptosid/debian sid) sometimes and after a reboot I can't find any infos about the reason for the freeze in messages/dmesg/syslog/Xorg.*.log. When it "freezes" I can ...
9
votes
2answers
913 views

Saving bash history from multiple Konsole not working correctly

I use multiple Konsole terminals. And I want all the commands I type in every terminal to be saved in command history, so that next konsole i open will have all of them. To prevent each terminal from ...
7
votes
2answers
10k views

How do I get Ctrl + Alt + t to launch ther terminal in Linux Mint 13 MATE?

Pressing Ctrl + Alt + t seems to do nothing on my Linux Mint 13 MATE. How can I set this shortcut to launch a terminal window? As a detail, it seems the terminal is mate-terminal rather than ...
2
votes
1answer
514 views

Is there a light HTTP proxy I can run without root privileges?

I am on a network where outgoing port 8080 is blocked on most machines (i.e. I cannot access services on port 8080). Some of the machines on the network however do not have this restriction. I would ...
6
votes
1answer
2k views

How can I enable URL rewriting on a DD-WRT router?

I would like to be able to add a parameter to certain URL requests that go through my DD-WRT router. Specifically, I'm trying to figure out how to force safe search in Google, which means I have to ...
6
votes
3answers
12k views

How can I block a specific URL on a DD-WRT router?

I've been looking everywhere for this. Does anyone know how to block a specific URL on a DD-WRT router? For example, I want to block website.com/whatever but not website.com, blah.website.com, or ...

15 30 50 per page