The command-line is the interactive interface to your shell.

learn more… | top users | synonyms (1)

2
votes
0answers
23 views

How can I list files of which no symlinks exist?

I have a large "myfiles"directory full of miscellanous documents and do not want to modify its structure. I therefore created (several) other directories for each class of documents. For example I ...
0
votes
0answers
29 views

How to generate a list of configuration files accessed by a tool (eg bash or vi)?

Many times, there are slight inconsistencies between two similar linux machines, where (for example) tmux supports colours on Machine M1, and does not support colours on Machine M2, or vi adds ...
1
vote
0answers
33 views

sudo -i returns an error

When I try to switch to root using sudo -i i get the error /var/tmp/sclDvf3Vx: line 8: -i: command not found... However, su - works which I will continue to use. I'm by no means a linux system ...
0
votes
1answer
30 views

What is the meaning of read -r ?

in order to understand another answer: find / -type d -print0 | while read -r -d ''; do ls -ltr "$dir" | sed '$!d' the first step is to understand the usage of the option -r of the read command. ...
3
votes
1answer
26 views

How to convert all odt files in a folder into microsoft word files ?

I have a folder with a lot of odt files from LibreOffice, I could open each one by hand and save it as a microsoft word file, but that would take a long time, is it possible to reach this goal using ...
1
vote
2answers
42 views

How to list only the last line of each directory?

I learned thanks to you, how to display only the last line of a listing,e.g. ls -ltr | sed '$!d' Now I thought, how to combine it with the find command, in order to repeat this onto each directory ...
0
votes
3answers
33 views

How to display only the last line of a listing ?

Supposed I make a listing and sort the files by its temporal attribute: ls -ltr -rwxrwxrwx 1 bla bla 4096 Feb 01 20:10 foo1 -rwxrwxrwx 1 bla bla 4096 Feb 01 20:12 foo2 . . . -rwxrwxrwx 1 bla bla ...
1
vote
0answers
5 views

Is it possible to make a key word search of all existing channels of all the irc networks from the command line ?

I am new to IRC (internet relay chat), as I understand it, an IRC network has a unique name like DALnet, is made of a chain of servers, a person can connect to one of them in order to connect to the ...
1
vote
0answers
30 views

Why won't my python scripts run without the python command when moved from Windows to Linux? [duplicate]

I have some Python files that I wrote on my Windows PC and then sent over to a Linux machine using pscp. They work as intended on Windows, but when I try to execute them on the Linux machine, I always ...
-3
votes
1answer
27 views

does curl -Ls 'http://pastebin.com/raw.php?i=r2jYDZaw' mean it will not output anything?

Does the s in -Ls mean that nothing should be outputted? If so what will be the output then?
2
votes
4answers
46 views

input file stream to command

How is it possible to send a file stream to this command instead of a file? /usr/local/bin/wkhtmltopdf --title "$SUBJECT" -q $SOURCEFILE $OUTPUTFILE The file stream is from a string in PHP.
0
votes
1answer
168 views

How to find all JPG files on the file system when .jpg extension is not obligatory ? [duplicate]

First thing I noticed when switched from Windows to Linux was, that Linux has no strict naming convention and no obligatory file name extensions like .bmp, .jpg, .exe etc. Therefore I can not tell by ...
2
votes
3answers
88 views

Difficulty converting from binary to hexadecimal using bc

I read how to calculate using the command line calculator and a HERE-document, but nevertheless I do not get what I expected and can not find my error, what I did in the shell was: bc << HERE ...
0
votes
0answers
34 views

Touch a file and give it an icon image via command line

Imagine this situation: for a given task, at some point of it, I should be able to create an empty file, which I can achieve by touch file.ext on the command line. However, if I touch a .jpg file, and ...
0
votes
1answer
41 views

Search a file for a string in multiple directories

Can someone please help me with a command to search a file for a string in multiple directories? I am searching for the VIP in httpd.conf in multiple httpd instances. I am using: find ./ -name ...
1
vote
1answer
30 views

Only pipe on Success [duplicate]

Is there a way in the Linux command line, to only have a command pipe its output to another, when the command didn't fail? $ cmda | cmdb I would like it, so when cmda returns a status code other ...
0
votes
1answer
12 views

Makes it a difference whether I use a different -n flag value for xargs in combination with find command ?

Assume, someone searches for files that match some criteria using the find command and pipes the result into the rm command. find / -type f -name "*.jpg" | xargs rm First, I am not sure if the ...
1
vote
3answers
99 views

What is the reason for having numbers within the brackets of a function ? [duplicate]

I have seen on many occasions a name of a function (frankly speaking I just call it function because of it typical appearance, they are though sometimes named commands or system calls but I do not ...
3
votes
1answer
28 views

why does the output of xargs -n2 applied to the same number of arguments different whether piped or from keyboard?

when I execute xargs -n2, enter x x x x x and hit Enter, I get only 4 x back: $ xargs -n2 x x x x x x x x x But, when I pipe the x x x x x into the same command, I get the same amount of x back: ...
-2
votes
0answers
23 views

Linux command inside C code: /* treat as comment? [migrated]

In C, I want to run linux command. Namely, int status; status=system("lftp ftp://192.168.1.1 -e "mget -E /2015/Date*/*Snap/*.csv"); The * above is wildcard matching. The C compiler thinks this is ...
1
vote
1answer
52 views

cat .bash_history | grep ./configure [on hold]

Why does this not give any output: cat .bash_history | grep ./configure on an system/in an shell where ./configure has been run multiple times. And if I use the arrow key's to scroll the history in ...
1
vote
1answer
51 views

Can not set the LC_TIME variable for the current process [duplicate]

On Linux Mint Rebecca, my current LC_TIME setting is LC_TIME="en_US.UTF-8" I would like to execute date and watch how the current date is displayed in a Chinese format with Chinese characters. ...
3
votes
2answers
57 views

How to list files on terminal so that we can see the file types such executable, ascii etc?

I have been trying to list files in directory using ls and passing it different options. Does it have the ability to list types of files as well ? I want to know which ones are executable , ...
0
votes
1answer
37 views

What is the logic behind the expression cat > foo << “wordofchoice” [duplicate]

I know the > and >> operators, > puts something into a file by deleting the old content, >> appends something onto the end of the file's content. When I only use cat > foo I am able to write ...
1
vote
1answer
31 views

How to configure the system in order beeing able to hear the sound of the \a escape character?

I read, that if I execute: echo -e "\a" a sound emerges, but frankly speaking, i executed this command several times and no sound happened.
5
votes
4answers
219 views

How to put a newline special character into a file using the echo command and redirection operator?

I would like to create a file by using the echo command and the redirection operator, the file should be made of a few lines. I tried to include a newline by "\n" inside the string: echo "first ...
0
votes
0answers
14 views

Dropped connections with b43 driver using Broadcom BCM43228 wireless chip on Arch Linux

I managed to get my wireless working with the b43-firmware package in the AUR and for at least a month it worked perfectly. However, recently the internet connection has been dropping out. I'm ...
1
vote
2answers
32 views

Open Firefox twice (with same profile)

There are tons of resources that tell how to run several instances of Firefox in parrallel. I can't find any that tells me how to configure a command (on a command line, start menu item, or panel ...
0
votes
1answer
21 views

. as a command line argument to a command running in background

I run grep some-string -r . &. While it is running in bkg, I cd to another directory. It seems that grep interprets the hard link . differently then. What happens before and after I change the ...
1
vote
1answer
46 views

How to Prompt the user to press Enter to Exit in terminal so that the terminal doesn't close automatically?

Here is my Port.sh file echo 'Give me a maximum of 5 seconds to run please.' lsof -i | grep Xvnc | grep ESTABLISHED | grep $USER lsof -i | grep $USER | grep Xvnc | grep -o -P '(?<=:).*(?=->)' ...
1
vote
1answer
22 views

How to determine the only additional file in otherwise two identical listings?

I have done a listing of the device folder two times, one time without the sd-card in the slot and one time inserted, the system automatically adds one file in the device folder. $ ls /dev | wc -l ...
3
votes
2answers
227 views

How to Find UID, GID, and any groups I belong to?

How to Find UID, GID, and any groups I belong to ?
5
votes
2answers
191 views

How to count duplicated last columns without removing them?

I have a file that contains 4 columns. I want to compare the last three columns and count how many times they occur without deleting any of the lines. I just want the count to be present in front of ...
1
vote
2answers
33 views

Live resizing of an ext3 filesytem on CentOS6.5

I have a problem with my remote server hosted by my provider, I have only SSH access. The problem consist of getting this error file system rootfs has reached critical status that causes problems with ...
1
vote
0answers
29 views

Printing to the terminal after boot

I am attempting to start a script that echos to the terminal once matchbox-terminal is loaded. I am able to run the script if I execute it in the existing xsession script located in ...
1
vote
1answer
41 views

awk with variables in condition and in output redirection file

I would please like some help with this command because I didn't find anything in documentation that can cover everything I want. I have some variables that are global, so I would prefer to keep them ...
0
votes
0answers
19 views

cannot enter CLI mode from my Dell laptop [closed]

my problem is: I start my Dell laptop in GUI mode (linux 6.0). From GUI mode when I want to switch to CLI mode, I get a black screen and my laptop hangs.... I just cannot enter CLI mode from my ...
2
votes
1answer
28 views

Is there a command that outputs ONLY the packages explicitly installed by the user? (ubuntu/debian)

I have tried searching for this but there seems to be no command that can output a list of packages (ideally in Ubuntu) that I have installed, not including any dependencies.
0
votes
1answer
30 views

unable to remove stopped job with ctrl+c

When I tried to change from super user to common user and therefore typed "exit", I got an error message, that a job was stopped and I could not log out as root. So I listed the jobs: #jobs [1]+ yes ...
10
votes
3answers
400 views

How can I make a graphical plot of a sequence of numbers from the standard input?

If have a long text file and I want to display all the lines in which a given pattern occurs, I do: grep -n form innsmouth.txt | cut -d : -f1 Now, I have a sequence of numbers (one number per line) ...
2
votes
2answers
220 views

Is it possible to login as root without the interactive password query ?

When I want to login as root, I usually have to type: su -l and than an interactive query starts in order to receive the password. Is it possible to login as root without this interactive query ? ...
0
votes
1answer
50 views

How can I observe my own actions via terminal

To understand Linux better I want to see which commands run in background. For example when I create new file via GUI, is there any way to see the which command runs in terminal?
0
votes
0answers
19 views

How to read - in Linux? [duplicate]

Whenever I am dictating linux CLI commands to someone I get in a dilemma on how to say - in English. For example, to dictate ls -la I sometimes say L S minus L A or L S hyphen L A or L S dash L A. Is ...
3
votes
2answers
132 views

How do you stop a bash shell expansion?

I know some methods for stopping process. When I type: echo {1..999999} > filename.txt I can't stop it from running. I can stop other processes with Ctrl+C | Ctrl+D | Ctrl+\ and etc. But none ...
1
vote
1answer
24 views

Why do my run level directories contain only start scripts and no single kill script?

I learned here that for each runlevel exist a directory with start and kill scripts. The start scripts are activated on entering , the kill scripts on leaving the runlevel. Start scripts and kill ...
2
votes
4answers
97 views

Creating directories in a loop and moving files to those directories

Consider a directory with N files. I can list the files alphabetically sorted and store the list by ls > list Then I want to create n sub-directories in same directory, which can be done by ...
3
votes
1answer
52 views

rlwrap -z pipeto: piping output through pagers

I am using rlwrap to colorize prompt in asterisk CLI: rlwrap -s 99999 -a -pRED /usr/sbin/asterisk -r I read in man rlwrap that I can also use rlwrap -z pipeto to pipe output through a ...
1
vote
0answers
12 views

How to start the twm manager on a system which already has a window manager ?

I am using linux mint codename rebecca with xface. I tried to follow a description how to start a window manager of once choice: created an empty .xinitrc file in my homefolder filled the file with ...
0
votes
0answers
10 views

How to install a particular version of boost with brew on MacOSX?

The command "brew install boost" works for me on my MacOSX, but it installs the latest boost 1.57. How to use brew to install the older 1.55?
2
votes
4answers
291 views

What is the difference between (cp f1.txt f2.txt) & (less f1.txt > f2.txt) [duplicate]

I know that both will copy data from f1.txt to f2.txt, but what is the real difference? (cp f1.txt f2.txt) vs: (less f1.txt > f2.txt)