1
vote
0answers
17 views

sed, insert file before last line

The following inserting file method for sed used to be working, even before last line, but not any more. Is it a bug in the current sed? Demo of inserting file method with sed: mkdir /tmp/test ...
0
votes
1answer
30 views

Can I restore a Unix server by copypasting system directories from a backup?

I messed up a Ubuntu server with lots of installed binaries, settings, etc. I'm going to have to reinstall Ubuntu, but I have a complete backup, hidden files and all, though not bootable. I'm hoping ...
1
vote
1answer
38 views

Find last 24 hours executed commands per each user in bash

How can I find last 24 hours executed commands per each user and mail them the result? I have Ubuntu GNU/Linux. I find out that I need a package named 'acct'. I have already installed and enabled that ...
0
votes
2answers
103 views

which unix or linux command is used to change root password of remote machine(Just an IP address) without using SSH Login

which unix or linux command is used to change root password of remote machine(Just an IP address)? Suppose I just have an IP address of the target machine which is on my network, But I do not know ...
0
votes
0answers
29 views

stop user from being runing any commands, should able to run only granted with sudo

Is there any single command or script which gives result, the list of how many commands a linux user is able to execute? And how to stop user from executing even a linux basic commands and should not ...
1
vote
0answers
26 views

Difference between Virtual Console and Workspace?

Please explain all differences between Virtual console and Workspace in Linux. If possible also kindly requested to specify definition and/or example. Many thanks.
1
vote
1answer
56 views

How to find available man chapter/section for a particular command? [duplicate]

For example: ls command have only chapter 1. while mkdir command have chapter 1 & 2. Is there any command which shows how many chapters are available for a particular command? [root@localhost /]# ...
1
vote
0answers
17 views

Difference between ntsysv and system-config-services

Please someone can guide the difference between: # ntsysv # system-config-services ntsysv - tune services should be automatically started, is it similar to chkconfig?
2
votes
3answers
41 views

Difference between service off and service stop?

Please can someone explain differences between service stop and service off: for example: # service httpd off # chkconfig httpd off
2
votes
4answers
129 views

/etc/rc.d what does rc stand for? [duplicate]

Do anybody have idea about full form of rc.d at? /etc/rc.d It contain scripts to is used to control the starting, stopping and restarting of daemons. But what exactly meaning of rc here, do ...
0
votes
2answers
66 views

Connect to the right serial port in Unix

Background I'm trying to connect to a device using UART though a micro-USB cable and GNU screen from Ubuntu and OSX. On both Ubuntu and OSX I can get the most recent serial connection with the ...
0
votes
1answer
164 views

gnuplot not working on ubuntu

My initial problem is that i am unable to find png as list of terminals in set term. So using the link http://askubuntu.com/questions/393882/png-terminal-in-gnuplot, I installed the gd library.And ...
0
votes
1answer
117 views

Unable to plot png in gnuplot

i need to plot png files in gnuplot 4.6.3 and/or 4.6.4.I am unable to do so as set term does not list "png" as an option. system information is Linux masterx-Studio-1535 3.5.0-27-generic #46-Ubuntu ...
1
vote
1answer
88 views

How to create an operating system on top of Ubuntu 13.10

I want create an operating system the way Mac did, building a program on top of a Unix operating system. I am planning to make a small operating system with a small amount of functions using C. I do ...
1
vote
2answers
1k views

Ubuntu : This does not look like a tar archive

I am trying to run the following command after I have downloaded a tar file using the sudo wget command to install CasperJS on our Ubuntu box. sudo tar -xvf casperjs.tar This does not look like a ...
1
vote
2answers
88 views

How to use 2x$$ together linux

the questing is how to use two variables togheter.. ex. $1,$2,$3 are set numb=2 I need to use command: head $$numb that must be the same as: head $2 I tried everything, I need to know what ...
0
votes
1answer
65 views

shell changing and login into ubuntu system

I have loggined into ubuntoo system using username-root and password-root. after running some commands i run chsh -s /bin/csh root to change its shell. but next time when i tried to logging into ...
0
votes
1answer
82 views

Can't remove a directory

I'm trying this: rm -fr /app/foo But getting error message: rm: cannot remove `/app/foo': Is a directory What I'm doing wrong?
1
vote
2answers
135 views

Convert ls -ld to chmod/chown commands

X home dir permissions: drwxr-xr-x Y home dir permissions: drwxr-x--x So my question is, how can i convert drwxr-x--x to a chmod/chown command so I can put the same permissions that Y has on his home ...
0
votes
1answer
551 views

Linux kernel source not found

I downloaded the source code of a driver (tun 1.1) and i was planning to installing when i obtained the following error: root@sergiosaturn-HP-Pavilion-dv6500-Notebook-PC:~/Documentos/Tese/tun-1.1# ...
1
vote
3answers
68 views

Is there a log of the output of startup commands?

While Ubuntu is starting up, the init rc commands are run. Is there a way to see their full output after the system has started?
1
vote
2answers
534 views

Using Piping with cat and less to concatenate 2 files

I'm fairly new to Unix commands and I just have a simple question. One exercise I'm working on wants me to use piping along with cat and less to concatenate 2 directories (in this case /etc/passwd ...
16
votes
3answers
1k views

How can I remove a file or directory called “\”?

I'm using terminal on a Ubuntu machine and there is a file that I would like to delete. The file's name is \ (just a backslash). Now usually I would just do rm filename However if I do rm \ then ...
0
votes
3answers
1k views

Change owner of the root folder and subfolders (Ubuntu 13.04)

I accidentally set owner of root folder (/) and all subfolders to one user by command $ sudo chown -R 'userName' /* Now I wanna set owner back to root user by command $ chown -R root:root /* But ...
4
votes
1answer
180 views

Edit a file through an on-the-fly encryption stream in Unix

Okay this is a weird sort of question. I might get down-voted for being stupid here. I'd like to be able to edit an encrypted file, but without having to manually decrypt it to a location on the ...
1
vote
3answers
892 views

How long do temporary files made with mktemp last?

I was wondering how long temp files created with mktemp last. It seems strange to me to rely on a file that could disappear at any time. I'm on ubuntu, if it matters.
2
votes
2answers
108 views

how to pass a flag as an argument to grep

I'm trying to pass -- as an argument to grep because the file I'm interested in contains -- within its text, like so grep -- file.txt but I cannot because grep sees -- as a flag. How do I pass -- ...
0
votes
1answer
22 views

Built installation usb key from linux virtual machine

I have a virtual machine I'd like to install as real os on my machine. As I have refit installed on my macbook air (Mac os, windows and ubuntu), I tried the clonezilla methode in order to overwrite ...
1
vote
2answers
180 views

Delete users who havent logged in for x days

got the simple code below USERS=`cat /etc/passwd` for USER in $USERS do echo "---------- $USER --------------" last -n 4 $USER done I want to ideally remove all users who haven't logged in ...
0
votes
1answer
39 views

Create a logging program

I want to create a program that logs all the processes started by the user and confirms after they are started. I don't want to log all the syscalls and other daemon processes. I have initially ...
0
votes
1answer
99 views

Revert Unix installation to fresh install

Let's say I have a fresh install of a Unix variant (Ubuntu, for instance), then I install different packages and edit some config files (php.ini, nginx.conf, etc.). Now say I want to revert Ubuntu to ...
0
votes
1answer
64 views

Automating setting up a Unix server

I have some various questions regarding setting up a Unix server, and how to do this smoothly: I just installed Ubuntu in Virtual Box on Mac. It struck me that you have to sit by the machine and ...
1
vote
2answers
236 views

scp command creating a copy in the remote machine itself

The command I am using to copy a file from remote to my local machine is as follows: scp root@IP_OF_MY_REMOTE_MACHINE:/home/sqldump.sql ~ So I am copying from /home directory of remote machine to ...
3
votes
1answer
98 views

How much RAM I could reduce [closed]

I'm renting VPS hosting where cost is based on RAM. Currently, i'm renting 4G. However, I wonder if I could reduce it to 2GB safely or even 1GB if possible. here my output of: "free -m" when server ...
0
votes
2answers
543 views

Which command is used to run or execute .exe files and movie files in linux?

I want to run movie files or executable file in linux. Which command is used run these two filetypes?
0
votes
2answers
1k views

How to make daemon starts automatically? Ubuntu server 12.04

I have nginx and postgresql daemons installed. How can make them start automatically every time server is started? I think to add sudo service nginx start sudo service postgresql start to ...
0
votes
3answers
56 views

Extra file with Same Name Created Automatically while writing a program in unix

Some time while writing a program for example convert.c a file with same name followed by tiled(~) convert.c~ gets created in same directory. why is this so and whats really happening .please explain ...
0
votes
2answers
986 views

Add color palette for Sakura terminal

How can add my own color palette in Sakura terminal? I use Ubuntu 12.04, and in options menu, I see only tango, Linux, xterm and rxvt palettes available.
1
vote
1answer
489 views

Installing .egg file for NLTK

I want to install NLTK on Ubuntu, and I'm following the instructions for UNIX here: http://nltk.org/install.html In step 2, I downloaded the egg file. Then I ran sudo sh setuptools-0.6c11-py2.7.egg ...
1
vote
1answer
110 views

Tail -f with pagination

I am trying to tail file with pagination tail -f foo.txt | more This works fine until file gets lets say 200 lines injected, when this happens nature of tail command is to go to end of file, at that ...
2
votes
0answers
386 views

MySQL crashes when connecting from localhost with tcp (UNIX sockets work)

I have Ubuntu 12.04 running MySQL server 5.5.24. I can connect with mysql --user root -p. status shows me : ... Connection: Localhost via UNIX socket ... When I try to connect with mysql --host ...
1
vote
1answer
132 views

Get PS1 evaluated value, or shell prompt value

I am trying to find the command that would return me evaluated value of $PS1 variable or just shell prompt with current path. e.g. foo-user@bar-pc:~\bar I would like to avoid using something like, ...
8
votes
3answers
10k views

Can files deleted with rm -rf be recovered?

When I delete folders or files in through osx terminal using the rm -rf, where do they go? I heard that some say they are deleted directly, but some also say it only "remove the link to the file ...
1
vote
1answer
425 views

Where should I put my application cache for Unix based apps?

I am building command line application, and I have a need to save some temp data to files. I do not know where is convention for applications to store their cache on unix based systems (in this case ...
0
votes
1answer
505 views

Unable to install finger package in Ubuntu

I am unable to install the finger package in Ubuntu .Below is the output on my terminal when I tried running the command `sudo apt-get install finger` ritesh@ubuntu:~$ sudo apt-get install ...
1
vote
1answer
129 views

Trying to setup sudo user

I'm trying to setup sudo without no password but still I get prompted for password, I'm using ubuntu, here is the relevant line from the sudoers configuration file : gandalf ALL=(ALL:ALL) NOPASSWD: ...
0
votes
1answer
35 views

Creating a link to name changing directory

I have an Ubuntu 12.04 installed using wubi + Win7. I'm trying to create a link to "my documents" directory which located in my C drive: C:\Users\Myuser\My Documents\ Since the Ubuntu is installed ...
2
votes
2answers
501 views

in Linux, how to go to the folder above the symbolic link folder of the actual path?

Say I got a folder with absolute location: /tmp/abc/def, and I created a symbolic link to this folder def, in my home directory. The symbolic link is also called def. Then after I get to the def from ...
6
votes
4answers
5k views

Linux Both Case Sensitive AND Case Insensitive and Always Inconvenient?

I'm using Ubuntu 10 and I'm quickly finding out that it's case sensitive when it's inconvenient for it to be so (like when autocompleting file paths with tab in terminal) but also case INsensitive ...
3
votes
2answers
438 views

The Less command can list directory contents in Gentoo Linux, but not in Ubuntu Linux

I regularly use the 'less' command in Gentoo like so: less /tmp (or any other directory, which I have access to.) Less then proceeds to show me the contents of that directory. I can also use Less to ...