2
votes
1answer
3 views
Is there a way to refer to multiple files in a directory without retyping the whole path?
In a bash shell, when I have to remove multiple files in the same directory, I currently need to do something like this:
rm /some/path/file1 /some/path/file2
Is there a shorter way to write this so ...
0
votes
0answers
6 views
Copy website from RedHat to CentOS
We currently have out website and website's cms hosted on a dedicated host which runs redhat. We want to remove redhat and install centos instead.
My question is, is there a straight forward way of ...
2
votes
1answer
118 views
tmux status line with blank line on top?
I have a nice tmux status line, but I don't like how the bash/commands run flush along it...that is, if the screen is full, i'm typing things right above the status line.
I'd like a one line break ...
0
votes
0answers
29 views
How to repair system if kernel panic?
I've just updated packages:
2013-05-23 11:15:34 startup archives unpack
2013-05-23 11:15:35 upgrade locales:all 2.13-38 2.17-3
2013-05-23 11:15:35 status half-configured locales:all 2.13-38
...
-3
votes
1answer
24 views
perl script explanation please [closed]
Write a perl program that reads in a text file containing
one word per line. Create a hash containing the words read as
keys and the number of times they have been read as the value.
Print ...
6
votes
1answer
191 views
How do I launch Pidgin when I click on an irc:// link?
Is there a way that when you click an IRC url (such as irc://##linux) that it will open Pidgin? I believe it has something to do with gconf-editor, but I do not know the terminal command to start an ...
0
votes
2answers
27 views
How to add a line from a list into another file when a specified line is found?
Basically I have 2 files. One has a list of router and switch login prompts, like this:
user@router1
user@router2
user@switch1
user@switch2
The other file has blocks of XML, like this:
...
0
votes
1answer
14 views
Apache subdomain can not be resolved
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName domain.no-ip.org
ServerAlias www.domain.no-ip.org
DocumentRoot /var/www/main
ErrorLog ...
5
votes
3answers
506 views
Is there any disadvantage in using SSHFS instead of SSH alone?
I find it easier to use SSHFS to mount a remote file system on my local computer instead of plainly SSH'ing into the remote computer. This saves me from using all the complicated scp commmands for ...
2
votes
3answers
81 views
Easy way to parse syslog date format
I'd like to write a script that analyses the last week's syslog.
But my syslog logs in a stupid date format, e.g. "May 22". If it logged as 2013-05-22, this task would be trivial.
Is there a way ...
0
votes
2answers
143 views
How to detect a possible hardware error?
I'm running Debian Wheezy on a HP Pavilion dv7 laptop and it freezes every now and then, requiring a reboot. One time it didn't even load the operating system, but it wasn't I who was using it so I ...
4
votes
2answers
63 views
Bash commands with spaces in them (git config or git-config?)
Please forgive me if this seems easy, but I only started learning Unix 2 days ago.
Basically, I have been taught that when typing a command into the terminal it needs to be of the form:
[command ...
0
votes
1answer
20 views
Read log file between two dates
I have to read log file between and my question is how to get only the text in the file wich is between two dates using unix commands?
Every line contain date and I want to get the text in the file ...
1
vote
1answer
16 views
What are the chkconfig directives (classic style) into init.d scripts?
To ask my question, I must first clarify the context.
Every init script in /etc/init.d (on RedHat and Centos distros) is prepared to be managed with the chkconfig command-line tool utility.
This ...
0
votes
2answers
17 views
How to run a script when install a rpm package?
I try to build rpm package. I follow here.
I want to run a script (bash or python) when run command as "rpm -Uvh mytest-1.0-1.el6.noarch.rpm" .
Could run a script when install a rpm package? How?
1
vote
1answer
77 views
lspci machine-readable format (-vmm) does not show a kernel Module/Driver line
I briefly read the manual of lspci, where I found out that there is a machine-readable format lspci output using "-m" or "-mm" or "-vmm".
I need to print out the device name, the device id and the ...
3
votes
2answers
102 views
Is grandchild process also child process?
In Unix/Linux terminology, do child processes of a process include grandchild processes of the process?
0
votes
2answers
47 views
What exactly is PKGBUILD and should I edit it when installing packages?
Whenever I use yaourt -Syua in my Manjaro Linux system, it'll give me
Edit PKGBUILD ? [Y/n] ("A" to abort)
and sometimes
Edit chromium-pepper-flash.install ? [Y/n] ("A" to abort)
Somewhere I ...
4
votes
3answers
38 views
Commandline global proxy program?
I'm living in China, and lots of web service is not available or stable here like Github/Bitbucket/Imgur, When I'm using wget, git or some other commandline tools, I need using a proxy.
Is there any ...
-2
votes
2answers
323 views
Where can I find a good tutorial for installing bcache? [closed]
I found on the net and it's all too complicated.
http://bcache.evilpiepirate.org/ for example seems like the official page for bache. Yet nothing is found there. How to install? How to set up? ...
11
votes
1answer
368 views
How to prevent shutdown when an SSH user is logged in?
I'm administrating a networked environment and I had an interesting situation arise yesterday. When a host is required to shutdown by a regular user, it refuses to do so if other users are logged in ...
3
votes
2answers
32 views
cannot write to file with write permission
I have this file:
$ ls -lrta ~/.bash_profile
-rwxr-x---. 1 xxx xxx 904 May 23 15:36 /home/xxx/.bash_profile
$
I am the owner of the file and I have write permission.
When I try to edit (delete the ...
0
votes
1answer
20 views
Query an overlayfs
I'm looking for a way to query a mounted overlay filesystem [overlayfs] in order to check it's upper and lower dir but till now I didn' find any suitable command.
Please , someone in the list know is ...
1
vote
1answer
139 views
Restricting access to yahoo.com in elinks using squid
I need to restrict access to yahoo.com and all its subdomains in elinks. I must use squid but I don't know how to configure it. Can anybody help me because I am new to Linux.
5
votes
6answers
2k views
Compare files that are in directory 1 but not directory 2?
I'm having trouble with a bash script I want to make
I know ls will list files that are in a directory but I want it to list directories that are in directory1 but NOT in directory2, and then list ...
0
votes
1answer
54 views
How can I create an encrypted, file-system–agnostic, mountable volume?
At work, we have an iMac (running OS X) that shares a partitioned hard drive over the network. I'd like to back up to my partition from my Linux machine. I've attempted connecting via cifs, then ...
0
votes
1answer
22 views
Strange changes in files
I have a very strange problem on one of my servers. I'm not sure if it's completely related to linux because it occurs in php and js files.
Today I was trying to backup my databases using phpmyadmin. ...
8
votes
1answer
119 views
What happens when I press “Shut Down” from the GUI?
I have been banging my head against this for quite a while now. It's related to this question. I would like to find out exactly what happens when I choose to shut down my Linux box from the GUI. This ...
4
votes
2answers
285 views
Can't share an ssh connection with rsync
In my .ssh/config file I have the following:
Host xxx
User yyy
HostName zzzz
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
This works great for multiplexing my ssh connections (i.e. login once, ...
3
votes
2answers
485 views
Remote-Accesible Live-Distribution(aka LiveCD)
I'm looking for a live-distribution (live CD or the likes) which comes - per default - with sshd running at startup.
I want to check the components of my laptop whose graphics has died ...
0
votes
1answer
29 views
Not able to remove a file
file name : abc
permissions : -rwxrwxrwx
shell : ksh
I am logged with the user which is the owner of this file.
Contents of file
AccessTime = 20130424-161120 ActualShmKeyDec = 1090650862 ...
1
vote
1answer
25 views
Ignore Symlinks when Extracting Tarball
I have a relatively simple question that I cannot seem to find the answer for. I am attempting to extract a tarball (*.tgz, to be exact) and receiving terminal errors on extracted symlinks. ...
0
votes
1answer
38 views
Privilege escalation detection?
I am not a linux/unix expert but everytime when I read about some local privilege escalation exploit (e.g. this),
I wonder if an OS can detect that there is someone logging in as root (or new root ...
0
votes
1answer
19 views
Changing timezone on Debian keeps Local Time in UTC
I'm trying to get programs to log in local time for my own sanity.
I have updated my timezone with:
dpkg-reconfigure tzdata
But the result of that command is:
Current default time zone: ...
0
votes
1answer
26 views
yum install wireshark-gnome
I tried using command yum install wireshark-gnome to install wireshark on RedHat 6.3. And I make sure the network is ok.
But it fails cause by below prompt.
Loaded plugins: product-id, security, ...
3
votes
2answers
71 views
Any ideas to simplify the awkward rsync expression below?
Here is expression:
rsync -avz --progress -e "ssh -i /where/is/my/id_dsa" vivek@some.host:`ssh -i /where/is/my/id_dsa vivek@some.host "find /remote/source/dir -type f -name '*.sql' | sort -nr | head ...
3
votes
1answer
1k views
How to disable moving between workspaces feature?
I have installed Linux Mint 14 Cinnamon – have been upgrading from Linux Mint 13.
There is a feature: I can move between workspaces by moving cursor to the edge of screen and holding it there ...
1
vote
2answers
74 views
How to make RHEL 6 to boot in Text-mode?
I am using RHEL 6.4 on a HP-Z620 Workstation.Whenever this machine starts up, it comes up with Graphics Mode e.g. Splash Screen,Red Hat Logo etc.
But I want my machine to start in Text Mode.
e.g. I ...
0
votes
2answers
79 views
What module for network card Intel Corporation Device 1521?
I'm installing a new server and I'm not able to figure out what module should I load to make its on-board network card work. Calling lspci prints:
Ethernet controller: Intel Corporation Device 1521
...
4
votes
1answer
33 views
How to configure Linux to cache file metadata in preference to contents?
I’d like to set the system up to use most RAM for file system metadata caching, but only a reasonably small amount for read/write caching and prefetching files. Ideally I would like to be able to ...
3
votes
4answers
2k views
Mount an loop file without root permission?
Can i mount a loop file without root permission , normally i do:
mount -o loop DISK_IMAGE FOLDER
Without setting up sudo or suid mount program , is there any suitable way to do this ?
I know i can ...
4
votes
4answers
38 views
Find out how much all tmp directy occupy
How can I know the size of all tmp folders for all users.
I tried
du -h /home/*/tmp
But it did not add them all together.
0
votes
1answer
205 views
Upgrade OpenGL from 1.2 to 2 for Nvidia GT218 [GeForce 310]
To run my application OpenGL version 2.0 or higher is required.
glxinfo | grep OpenGL yields:
Xlib: extension "NV-GLX" missing on display ":1007.0".
OpenGL vendor string: Mesa project: ...
1
vote
3answers
36 views
bash script to login multiple remote server and execute a script
I want to make a script that will remote login to the multiple servers listed in a txt file like
10.3.9.6
10.3.9.7
and all servers have same username and password.
and want to capture the output of ...
1
vote
3answers
393 views
vim how to configure backspace and delete key's both as normal
How to configure following keys in vim?
Backspace key to delete a character backwards.
Delete key to delete a character forwards.
After reading some posts, I got to know that only one of those can ...
0
votes
1answer
16 views
Fedora 18 not working on an HP Dv7
I've recently installed Fedora 18 on my brand new HP Dv7 that comes with Windows 8 and secure boot. Before install Fedora I disabled secure boot in the BIOS. I've installed Fedora 18 and all is ...
1
vote
1answer
167 views
Can Safecopy Help Me Recover Data from a Drive that I can not Mount?
I have an old hard drive that I put data on, but it died when I tried to retrieve it, and it tells me I have to format it under Windows. Running on Linux now, can Safecopy help me even though I can ...
0
votes
0answers
19 views
redundant array of NTFS disks
I have a number of NFS disks with unused capacity. They are leftover external hard drives with a Windows history. I have a very limited number of USB ports on my machine, and want to find a cheap way ...
9
votes
4answers
217 views
Why do I have to re-set env vars in tmux when I re-attach?
I mainly work on a mac and ssh/tmux attach to a Linux machine to do my work. I have ssh-agent running on the Linux machine. I have
set -g update-environment "SSH_AUTH_SOCK SSH_ASKPASS WINDOWID ...
1
vote
1answer
59 views
Regex to Cisco Interface
I would like to know if have some Sed/Grep or Awk regex to parse Cisco interface section and exclude if interface is down (shutdown), like example bellow.
Example:
!
interface FastEthernet0/1
ip ...



