All Questions
1
vote
1answer
18 views
Serve Internet to remote machine via SSH?
This question is asked from few times but my setup is little different from other setup.
I have my machine sitting in closed network with no internet and I have sudo access to that machine. But I ...
0
votes
1answer
18 views
Recovering a file that is overwritten with cat >
If you have a file called myfile and you do cat > myfile instead of cat myfile (to see it's contents) I understand that it is overwritten. Is there any possible way to recover its contents? I tried ...
-1
votes
1answer
7 views
Unable to restrict a user from using certain commands
I have been trying to use the following in visudo to restrict a user from using the following commands and going into another directory , but this doesn't seem to work
myuser ALL=!/home/ubuntu,!/usr/...
0
votes
0answers
9 views
Is it normal to have duplicate /var mount if using docker?
Question: /var is mounted twice, is this normal for a system that uses docker?
"df -m | grep var" only shows it mounted at /var.
Versions are: RHEL 7.2 Maipo, docker-engine-1.12.1-1.el7.centos....
-4
votes
2answers
12 views
Install a different OS on my raspberry pi other than raspbian
I would like to try other systems other than raspbian.
So, I have a debian.iso which i mounted by:
sudo mkdir /mnt/iso
sudo mount -o loop /home/tim/Downloads/debian.iso /mnt/iso
okay, so now what ...
0
votes
0answers
5 views
rsync --delete-excluded with --prune-empty-dirs, but only prune excluded directories
I've been using rsync to clone my Windows user profile to a remote server on a nightly basis. I'm using a --filter='merge ' arg to load a file full of include/exclude rules, which I use to avoid ...
1
vote
1answer
7 views
Linux http_proxy env vars and Firefox websocket connection
The question: is there an env var like http_proxy that will cause Firefox to make WebSocket connections through my proxy when "Use system proxy settings" is selected?
I'm running Linux and ...
0
votes
0answers
12 views
Cannot set Attribute Permissions to 0666 in sysfs
I am working with sysfs and I need to create a file under sysfs, the file should be readable and writable by all users, for which I set the Permissions in '__ATTR' to 0666. But the module does not ...
0
votes
2answers
17 views
How to execute the command in cronjob to display the output in terminal
i have a query on cronjob , if i execute a command using cronjob is it possible to display the output in terminal rather than saving in output file .
say for eg
*/2 * * * root /bin/ping xx.xx.xx.xx ...
0
votes
2answers
12 views
How to change apps default language on Debian?
I have an arm-based computer(nanopi) that is Chinese, so the default language of iceweasle is Chinese(it shows the results of search by google's Chinese engine) how can I fix that and remove Chinese ...
-1
votes
0answers
14 views
Rsync remove root as owner
Please help i just created an app that will automatically copy from directory A to directory B. This app running in ROOT permission and it execute the rsync command.
The problem is Directory A and ...
0
votes
1answer
20 views
tailf output as script parameter
Why is it when I leave the following tailf running:
tailf /var/log/z-way-server.log | grep --line-buffered device-info | gawk 'BEGIN { FS = "\"" } ; {print $4,"is",$8}'
I get my desired output:
Den ...
-1
votes
3answers
24 views
How to look for a pattern in a file and print something if it finds a pattern?
Example -
test.log:
ConductID: null; RunOpSequenceCode: 12345678; ClientID: null; FescoOfferID: null; PriorityCode: null; RowNumberStart: 0; FetchSize: 0; ChannelTypes: ER,PART; NigoIndicator: null;...
1
vote
1answer
16 views
I can not set arm-based Debian date and time!
I have an arm-based board (nanopi m1, something like raspberry), and I tried to update the date and time! I used every methods I saw in the web but it didn't work!(Actualy my default date was 1970 in ...
-2
votes
1answer
17 views
How to execute 32 bit programs in Kali Linux 2.7 (64 bit)
I am trying to execute a 32 bit file in Kali. But is says no such file or directory. I tried the following solutions:
Then, I checked the installed architectures, and i386 is installed it seems.
I ...
0
votes
0answers
7 views
How to fix the white screen issue in Kali Linux 2.0?
The desktop becomes white automatically and then, I can't change the wallpaper too. I need to logout and login again to make it normal. Also, the file explorer view, the title bar and the icons get ...
0
votes
1answer
12 views
C++ Apps ready for Linux as well as Windows? [on hold]
I don't actually know where to start and what keywords to use for searching more, but can we simply make a programs in C++ that runs in Linux as well as Windows. I guess we are talking about binary ...
0
votes
0answers
19 views
Passing filenames with space between scripts [duplicate]
I've got a script that processes filenames given as parameters on the command line.
This is a stripped down version to demonstrate the processing:
#!/bin/bash
# Just a test to see if parameter ...
0
votes
0answers
11 views
Camera moving too fast in 3d games
This occurs on games that run natively and games that run on WINE. When simply moving the cursor across the screen, it moves at a normal speed. When clicking in the screen to move the camera, it moves ...
0
votes
0answers
20 views
How to log out of the system using a bash script
I went about making a small script that requires an extra passcode when logging into my account on the system.
#!/bin/bash
clear
unset password
prompt="Enter Passcode: "
while IFS= read -p "$prompt" -...
0
votes
0answers
4 views
NFS Group Permission Denied. Users have correct group permissions and matching IDs
I am really pulling my hair out over this one.
My nfs mounts on two RHEL 6 servers are not respecting group permissions for nfs shares. The group works great for access to local files but not nfs ...
0
votes
0answers
6 views
Creading a CenttOS 7 compatible encrypted password in Windows
How do I create a crypt(3) encrypted password in a Windows DevBox that a remote CentOS 7 server can interpret successfully when creating a new user account via the following useradd command in a bash ...
-1
votes
0answers
9 views
try to connect wifi on centos7 [on hold]
I just install the centos7 using the virtual box on mac book air. I don't have a wired internet, so I want to connect wifi. I also don't have a wireless card. So I just want to install a wireless ...
0
votes
1answer
17 views
Copying files while maintaining file attributes
Say, if I want to copy /etc/bin to a folder while maintaining the file attributes as well as parent directories. [The target folder should not just contain bin folder but /etc/bin.]
Is the possible ...
0
votes
0answers
15 views
Special Variable in python
Perl code
print "\nInput User : "; $usr=<STDIN>;
chomp $usr;
system ("grep ^$usr: /etc/passwd");
if ( $? == 0 ){
print "User with name $usr exist\n";
}
else{
print "User with ...
-1
votes
0answers
7 views
Fedora 25 mouse problem
So I wanted to switch to fedora on my custom built pc, since I can't get to work half of my stuff on ubuntu and after booting from usb to fedora live I can't move my mouse..... Did anyone have any ...
0
votes
0answers
11 views
How do I fix the add-apt-repository error in Kali Linux 2.0?
I have the Kali Linux Rolling 2.0 installed. Whenever I do sudo add-apt-repository, it shows an error: command not found.
To fix this, I tried apt-get install python-software-propertiesenter code here ...
0
votes
0answers
2 views
How to use GnomeKeyring with removable medium?
According to the GnomeKeyring Goal wiki pages, the feature Storing Keyrings on Removable Disks has already been implemented since 2.31, which happened in 2013.
There is no further details or ...
0
votes
0answers
5 views
What is the fastest way of checking a encfs password?
Is there any faster way of checking the password of an encfs folder than
echo <password> | encfs -S /root/.folder /root/folder
0
votes
1answer
12 views
Checking if software is installed in SSH session
I am trying to check whether a certain package is installed on remote machine in bash script.
If I execute the following statement on the machine itself the result is 1 (installed) in file check.txt, ...
0
votes
0answers
15 views
Transmitting a content of a text file from one server to another? [on hold]
What's the best and easiest way to transmit the content of a text of file or a file itself of the size around 100Kb from one server to another programmatically? That is, using a programming language ...
0
votes
0answers
11 views
Default Environment Variables not Set when Issuing SSH Command
we have two serers (svr1 & svr2) that are using passwordless authentication and we're trying to run the example script below:
contents of test.sh
#!/bin/sh
echo "hello ${APP_TOP} exit"
if i run ...
0
votes
0answers
4 views
Can you use a Docker image with LXC/LXD?
I need to launch an LXC container on OpenStack Nova-Compute, but I like the comfort of building images with Docker.
Since Docker uses LXC, is it possible to "export" a Docker image as a LXC image to ...
1
vote
1answer
30 views
How does a directory inode keep its file list?
Does a directory inode use a plain array storing ( filename, inode ) pairs, or some kind of associative array { filename: inode }to speed up file lookup, or any other optimizations on a plain array?
...
2
votes
0answers
9 views
Running many consecutive exes with wine, fast
Starting a windows exe with wine is slow, because the wine should be initialized first which is slow (mapping and linking a lot of dlls, analyzing config files, mapping resources, etc).
I think if ...
0
votes
2answers
11 views
Compare two files and print matches in the first file adding extra column
I have two different files with one column each. The file 1 has more info and I want a command to search the matches against the file 2 and then return the original file 1 with an extra column saying ...
0
votes
0answers
8 views
Bulk Reverse DNS query with DIG
Alright,
I want to do a bulk reverse DNS query to a specific nameserver.
Currently, after searching here and Google, I got it to work for 1 entry at the time with the following command:
dig @...
1
vote
1answer
19 views
What are the consequences of having many files in a directory in an ext4 filesystem?
My task is to store a list of JSONs on disk (without using any database) and I have these options:
Store them in a single, large file.
Store them in separate files, keyed by their IDs.
Personally I ...
1
vote
1answer
8 views
Pipe data onto another machine with nologin
I have a huge directory I want to copy to another machine as a .tar.gz file. I don't have a lot of space on either machine, so I'd like to copy the file through a pipe, like this:
tar -czf - ...
-4
votes
1answer
35 views
what distro/theme is that (from a picture) [on hold]
Hi I would be grateful if someone could tell me what from this image what distro that is:
0
votes
0answers
8 views
OpenVPN Ubuntu Layer2 Bridge not working
I’m trying to setup a bridged OpenVPN connection (Site2Site) for a company network to work as follows:
• One VPN-Client that serves the local area network with a VPN-Connection to the Datacenter (...
1
vote
1answer
16 views
How I can find line(s) which the third columns is not digit/date?
I am trying to use awk command to find line(s) which the third columns is not digit/date? Suppose there is a file comma "," field separated, has three columns and as code "," measure "," dd/mm/yyyy,
...
2
votes
0answers
8 views
Keychain Password Removal Command
Looking for a little guidance on removing all instances of a generic password keychain by either the service (svce) or label string. I can do it once at a time but I sometimes have machines that have ...
0
votes
0answers
13 views
sftp deleting transferred local file [on hold]
So I ran this command in terminal sftp $name@$r_host <<< $'put n.file', which puts n.file to remote host, r_host's home directory form local directory. After exiting sftp command, I found ...
0
votes
2answers
36 views
Rename a bunch of files, changing several substrings [duplicate]
I've got a bunch of files with names like image(1) image(2) image(3) . I'd like to rename those en masse along the lines of image1.jpg image2.jpg etc.
I can do it in two steps by means of curly ...
0
votes
1answer
11 views
Respond to interactive spawned child process
There's a command from Amazon Web Services called eb init that allows you to initiate the current working directory as a elasticbeanstalk app.
This command is interactive, meaning eb init will ...
1
vote
1answer
20 views
Is there a way to find patches which need testing from packages you have?
$ dpkg -l
Gives you a list of all packages installed on your system. Now some bugs on the Debian BTS are tagged patch . Now is there a way to list all packages which are installed on your system for ...
-1
votes
0answers
15 views
Corrupt ext4 filesystem
I was moving an ext4 partition with Debian installed (/dev/sda5) (about 170/450 gigabytes used) up with GParted (there was some unallocated unpartitioned free space before the partition), and it, ...
1
vote
0answers
4 views
libpam-pwquality not working in Ubuntu 16.04
I installed libpam-pwquality: sudo apt-get install libpam-pwquality, and configured /etc/pam.d/common-password:
password requisite pam_pwquality.so retry=3 minlen=10
...
-4
votes
1answer
29 views
Bash: integer expression expected
This recently stopped working. Any idea if I need to change anything in code?
TIME=`grep real < /tmp/EV_Check.time | cut -d ' ' -f2`
time=$TIME
test $time -ge $ct
result=$?
if [ "$result" -...