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

learn more… | top users | synonyms (1)

1
vote
1answer
26 views

cd to my folders shows me an error

I just logged out my system and logged on. And i tried to get into my folder cd /u/folder It says Too many levels of symbolic links. But it worked yesterday. What could be the reason? I found ...
0
votes
1answer
19 views

ssh-copy-id different port

i am trying execute ssh-copy-id in one port different than 22 (default). I researched and found the command below $ssh-copy-id -i ~/.ssh/id_rsa.pub "user@192.168.0.1 -p 22001" but, when execute the ...
8
votes
5answers
1k views

Is it possible to reverse a command in the bash shell?

I was wondering if there is a (simple) possibility to redo/reverse a command that was executed in the bash shell? (to make it undone) Is there something similar to the ctrl+z combination to redo any ...
3
votes
3answers
410 views

Why do we have to pass the file name twice in exec functions?

I read Advanced Programming in the UNIX Environment by Stevens, 8th chapter. I read and understand all the six of exec functions. One thing I notice is, in all the exec functions: first argument is ...
0
votes
1answer
16 views

Saving from arecord on a raspberry pi across a network to a mac

I've currently got a usb mic plugged into a Raspberry Pi B+ and am using the following code to record data: arecord --buffer-time=5000000 -D plughw:1,0 -f cd -t raw | lame -r - stream.mp3 I then ...
8
votes
4answers
383 views

How to remove duplicate characters?

If I am having a line as: Thhiisss iisss mmyyy nameeee I want to print this as: This is my name What is the unix command for this?
-1
votes
0answers
18 views

How can I check which partition scheme is used from the command line ? [duplicate]

I read, there exist two partition schemes: MSDOS Scheme and GPT (GUID partitioning table). I saw how it is made with Gparted, is it possible to show this information just from inside the shell ?
0
votes
1answer
23 views

Why aren't sda3 and sda4 displayed with fdsik -l?

I wanted to display all my partitions, so I entered "fdisk -l". AFAIK, the format of the device file for a scsi hard disk reads like: sd_whichharddisk_whichpartition. To my surprise, after hitting ...
1
vote
0answers
59 views

What is the meaning of the string **/* when used with grep?

I came across this picture (below), obviously it is a pun or some kind of allusion incorporating command-line expressions. Frankly speaking I do not understand anything of it except for grep -n. ...
1
vote
2answers
93 views

for loop when matching both front and back of file name

I'm trying to set up a for loop to run a process on pairs of files. The names of the files look like this 36_002_CGATGT_L001_R1_005.fastq.gz 36_002_CGATGT_L001_R2_005.fastq.gz ...
0
votes
1answer
36 views

What is the meaning of (^| )ABC( |$) as an extended REGEX ?

I came here across the command grep -E '(^| )ABC( |$)' file1 I am confused how to interpret the regular expression therein, because I know the ^ and $ character as beginning and end signifier, but in ...
1
vote
1answer
25 views

How do I control output after executing a command?

.. Script Run Complete. You have new mail in /var/spool/mail/<user-name> -bash-3.2$ I have seen the above message most the times on my prompt, probably while it's idle or as soon as script ...
1
vote
0answers
14 views

mkvmerge Backward Spliting not supported why?

I tried this:- mkvmerge -o new_file.ogg --split parts:0s-104s,+94s-208s,+8s-12s,+312s-410s,+17s-21s 500.ogg Thrown this error: "The start time must be bigger than or equal to the previous part's ...
1
vote
3answers
77 views

What is the meaning of ls -d ?

I entered the man page of ls, the entry for the -d option is as follows: -d, --directory list directory entries instead of contents, and do not derefer‐ ence ...
0
votes
1answer
20 views

tail-ing a filename that is a date [duplicate]

I am creating a logfile from kermit named the current date (which is in the format of DD MMM YYYY - which can not be changed AFAIK), and using the file name as today's date. I then have a Bash script ...
1
vote
1answer
30 views

Replace case-insensitive string in all folder files

I'm trying to replace a string with another in all files in dir. Trying to use this command sed 's/foo/bar/' * But it replaces foo and not fOo or Foo and others. how to find "foo" ...
0
votes
2answers
40 views

Why can't I kill the shell using the PID obtained from the $$ special variable? [duplicate]

After I have learned that the $$ special variable holds the process number of the shell, I tried too kill the shell by simply: kill , however this did not work, I also tried some variations, but them ...
-1
votes
0answers
24 views

Delete string from all the files in the folder

I'm seeking for way to delete string from all files in the folder by the regular expression pattern. Need to delete not the whole string but just pattern. Need to delete the strings which looks like: ...
7
votes
7answers
180 views

What is the purpose of having two variables ($@,$*) to transmit the arguments of a command into a script? [duplicate]

I have read of the special variables used in a script $@ and $*. As far as I understand, the arguments used while executing the script are stored into two special variables, once all arguments into $@ ...
1
vote
1answer
48 views

No such directory after creating it

I'm taking a basic Unix course and right now we're learning terminal. My directions are create a directory called company and subdirectories called sales, accounting and marketing. So I did that. ...
0
votes
1answer
27 views

SIPp “hello world” message to Asterisk

How do I run diagnostics against Asterisk? Asterisk is running on tleilax; and doge is on the same network (My network topology isn't optimal). Specifically, I want to do something like: sipp ...
1
vote
1answer
65 views

Changing themes and hot-corner settings from command-line

I want to change the elementary tweak themes and hot-corner settings on my Elementary Luna (built on Ubuntu 12.04 "Precise") from the commandline. With what command can I do this? I know how to make ...
-2
votes
0answers
30 views

Remove the string from the all the files in the folder

Need to remove the sought-for string from the all files in folder. Could you give me please the pattern of command? Big THX.
1
vote
1answer
111 views

Linux commands for kids [closed]

My youngest daughter (6) is fascinated with the sl and gti commands. She even learned to combine them with ; and when the time comes to teach her about return values I'll show her how sl && ...
1
vote
1answer
15 views

How to display metainformation for different kinds of time of a file ?

As far as I know each name within a path, e.g. /name1/name2/name3, is allocated to one inode. This inode is a collection of meta information for each name (file or directory). Some of these ...
-1
votes
1answer
41 views

How to install stardict from a tar.gz manually ?

I have downloaded stardict-2.0.0-pre2.tar.gz and applied the extraction on it by writing: tar xzvf stardict-2.0.0-pre2.tar.gz , thereupon a new folder was created with the following content: From ...
1
vote
2answers
67 views

How to list only JPEG files from root below using the command line ?

I am searching for a method to find only JPEG files, With my limited knowledge of Linux I came to this point: 1. list all paths that exist from root below with find / 2. pipe the result into next ...
10
votes
5answers
777 views

How do I get the size of a directory on the command line?

I tried to obtain the size of a folder (containing folders and sub folders) by using the ls command with option l. It seems to work for files (ls -l file name), but if I try to get the size of a ...
3
votes
3answers
65 views

how to remove accidentally created '~' and '..'

I'm using wget to download some webpages and I used the -P option without knowing that it wouldn't expend .. or ~. So I found I've created them after running the program. Now the problem is, how do I ...
2
votes
0answers
28 views

How to display entire subject line in `mail`?

There are two messages in /var/mail/test. mail Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/test": 2 messages 2 new >N 1 test@test Tue Feb 17 15:07 18/628 *** SECURITY ...
-1
votes
2answers
21 views

How to create a new partitioning table on SD card from the command line ? [closed]

I have tried to mount a SD card on Linux Mint, I have found the right device file and tried: mount -t vfat /dev/sdb /mnt/zauberportal ,but it failed and I tried some variations like different types of ...
2
votes
2answers
73 views

Using find to list all files under certain directory

I'm trying to use a single line command that will find every directory (or sub-directory) named bin and will then print a list of all the files under it, but will not also list the directory names ...
0
votes
3answers
64 views

Simple TCP server listening on a port but not returning SYN-ACK

I am looking for a command-line TCP server (preferably a one-liner), that will listen on a specified port and when received SYN, it will not respond with SYN-ACK as usual TCP servers do. The purpose ...
0
votes
2answers
24 views

Simple http server from the command line that will always cause a timeout

Regarding the question Simple command line http server I would like to know, what is the simplest method for creating a http server listening on a specified port that will always cause timeout (it ...
0
votes
1answer
39 views

How to find with grep lines that end in a certain string?

I know that to find a REGEX that ends in a certain string I have to write "string$". Although I tried the following variations of grep : cat foo | grep "string$", cat foo | egrep "string$", grep -E ...
1
vote
2answers
53 views

Copy files to multiple computers over LAN

Good day, I am pretty new to Unix and I need to do this simple task. I have a few files, let's name them file01, file02, file03 etc. and I need to copy each of them to one computer from a list. The ...
0
votes
1answer
38 views

What does the option -C achieve in ls output?

In the man pages it says: -C list entries by columns However, I really cannot notice any difference between the output of ls or ls -C, could someone explain this to me?
1
vote
0answers
30 views

How much arguments can I pass to command? [duplicate]

Is there any limit of arguments that could be passed to C/C++, Python, Bash etc. program? Practical usage: pass bitmap data from/to C++ to/from Python program via arguments.
0
votes
2answers
56 views

What regular expression in grep searches for strings of three same letters in a row?

I have a text file and I am using the grep command with a regular expression to get only the lines which contain three same successive letters, e.g.: aaa bbb ccc ddd What regular expression do I ...
11
votes
4answers
526 views

What is the meaning of IFS=$'\n' in bash scripting ?

at the beginning of a shell script program in the bash is the following line: IFS=$'\n' What is the meaning behind this collection of symbols ?
-1
votes
2answers
45 views

How do I get a list of all directories and files with absolute paths each line ?

Using ls -R / i get every file and directory listed that exists, but not in the desired format. What do I need to write on the command line in order to get a list in such a format, that every line ...
5
votes
3answers
283 views

How do I move all the files with the same name scattered through the file system into one folder?

I have a file system tree and on different locations within it are files with the same name. I tried the following command on the command line: find / -name "HAHA" -exec mv {} /home \; It only ...
6
votes
3answers
293 views

How do I use the regular pattern operator {m,n} in grep?

I have a text file, from which I need to select only those lines, which include the string "tt". So I tried this on the command line: grep "t{2}" textfile Allthough I know the textfile contains ...
0
votes
1answer
29 views

Command to to restart Pantheon files manager (elemenaryOS)?

After editing context menu entries (by editing files in /usr/share/contractor) I have to restart the file manager to see the changes. How to restart Pantheon Files with a command so that I don't have ...
1
vote
1answer
23 views

How do i start a sound file without displaying the window of the player ?

Whenever I type xdg-open filename or vlc filename, a window opens and start playing the filename. How can I achieve to play the sound file without displaying a corresponding window in the command line ...
1
vote
0answers
32 views

How can I get my Linux distribution name and version using the command line ? [duplicate]

I have Linux Mint Version 7.1 Rebecca. What do I need to write in the command line in order to find this information. I tried uname -a , but I got informations about my computer name, Kernel Version ...
0
votes
1answer
17 views

what do i need to do additionally to start X in order to not end in a black screen?

From the xfce desktop environment in Linux Mint, I pressed Ctrl + Alt + Fn in order to get into a virtual terminal, then I stopped the mdm display manager with killall mdm. So far it worked, but once ...
0
votes
1answer
61 views

command to clean up old log files

I was trying to automate some auto cleaning of my Ubuntu System, with Cron Jobs I tryed to simplify this: sudo find /var/log -type f -name "*.1.gz" -delete sudo find /var/log -type f -name "*.2.gz" ...
0
votes
2answers
72 views

what are considered old and powerfull commands? [closed]

I came across the terms awk and sed, awk goes once through all lines and performs a task whenever a line meets a certain condition, sed can manipulate a stream of input before it goes further to the ...
2
votes
0answers
32 views

Show connected printers in CUPS

Is there a way to list the available/connected printers in CUPS using the command line or better yet using the CUPS API ? I already tried lpstat -a but it only lists the installed printers and not ...