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

learn more… | top users | synonyms (1)

1
vote
3answers
166 views

Removing a directory that has no files in it

I recently created a username and a group called gamesForAdmin. Since then I deleted it and the folder I made for it is still there: drwxr-xr-x 5 root root 4096 Jul 4 11:28 . drwxr-xr-x ...
3
votes
4answers
194 views

Generate random numbers in specific range

After googling a bit I couldn't find a simple way to generate with a shell command a random number included in a specific range, between a minimum and a maximum. I read about /dev/random, ...
9
votes
1answer
126 views

Is there a standard for writing a command synopsis?

It appears to me that everyone has their own idea on how to write a synopsis describing command usage for the end user. For example, this is the format from man grep: grep [OPTIONS] PATTERN ...
2
votes
1answer
57 views

Why does tmux fail to “scroll” when entering a command that exceeds one line? (OSX Terminal.app)

When I use tmux and enter a command that exceeds the line, it fails to redraw the previous line. It simply clears the current line and I can't see what I just wrote. It does only redraw the first ...
5
votes
3answers
174 views

Combining brace expansion and output redirection

Often, I use parameter expansion on the command-line, such as cp a.{ext1,ext2} which is expands to cp a.ext1 a.ext2 However, in many cases I do not use cp, but another tool, let's call it cat, ...
4
votes
1answer
291 views

Cleaning voice recordings from command line?

I have used Audacity for removing noise from recordings before, however it has very limited command line usage. I have ~100 short lecture videos which I will be watching over the next few months and ...
4
votes
1answer
350 views

Can't connect to an external RDS TSG server from home

We have a company RDS (Remote Desktop Server) TSG (Terminal Services Gateway) server, which allows employees to connect to an RDS session from home, so they can see a work RDS desktop from home. This ...
1
vote
1answer
116 views

How to find list of available shells by command-line?

How to list available shells for use by command-line?
3
votes
0answers
139 views

Import VPN config files to NetworkManager from command line

One can import .ovpn files to NetworkManager through GUI tool nm-connection-editor (right click on nm-applet and click on Edit connections): Add -> Import a saved VPN configuration.... My goal is to ...
3
votes
2answers
44 views

How can I list the info for an array of /dev/disks using bash expansion or substitution?

I want the output of: diskutil list; diskutil info [multiple devices] Without having to do: diskutil info disk0; diskutil info disk0s1; diskutil info disk1 ...etc For example, with many builtin ...
0
votes
0answers
9 views

A commad to change between activities [duplicate]

Is there a command to swtich between activities in KDE plasma-desktop?
2
votes
1answer
286 views

List All Network Printers (including ones not installed)

It is easy to list the printers you've already installed with this command: lpstat -a However, this does not list network printers you have NOT installed. nmap will scan for all open ports on the ...
6
votes
1answer
101 views

Filetype and dereference when listing directory with LS command

I'm trying to combine arguments to the ls command to list a directory content. What I'm basically trying to achieve is listing the directory dereferencing all links, but showing explicitly that the ...
1
vote
1answer
94 views

Terminal sometimes fails to find executables on local directory [duplicate]

I can open my terminal emulator via a keyboard shortcut or through the apps finder that executes the exo-open --launch TerminalEmulator command. My terminal starts and I can cd to any directory and ...
1
vote
0answers
14 views

Why does wget return a HTTP 403 error to download openSSH pet? [duplicate]

I am trying to learn how I would get OpenSSH using the command line. I found a *.pet link on this webpage: http://puppylinux.org/wikka/OpenSSH which says: Installation Install an appropriate ...
2
votes
1answer
102 views

Using a string parameter in terminal

What's wrong with this command: nmcli c up uuid "$nmcli -t -f uuid c" How can I fix it? "$nmcli -t -f uuid c" is a uuid needed after nmcli c up uuid.
1
vote
1answer
232 views

Change a value in a config file, or add the setting if it doesn't exist?

When modifying config files from the command line, I often want to find the setting in the config file and modify that line if that setting exists. If that setting doesn't exist, I want to add it to ...
1
vote
1answer
72 views

How to invoke Gnome 3 activity screen using command line?

What I'm trying to do I'm using a Logitech MX Revolution mouse, which has a button below the scroll wheel mapped to search, which I remapped to middle click. For doing so, I had to remap XF86Search ...
0
votes
1answer
43 views

automatically download latest stable tarball from sourceforge from command line?

I'd like to install a program from sourceforge sources. Is there a way to download the latest stable source from SourceForge? an example for ntopng would be very welcome.
1
vote
5answers
148 views

How to copy a file from a remote network to the local desktop

So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. I am trying to follow this How-to : However, I think one ...
8
votes
2answers
516 views

disable CTRL-D window close in terminator (terminal emulator)

I am often logged in through multiple SSH sessions. To logout from my sessions, I press CTRL+d, until I am back on my local machine. However, sometimes I press once too many, and my terminal exits. ...
7
votes
6answers
2k views

How to read first and last line from cat output?

I have text file. Task - get first and last line from file after $ cat file | grep -E "1|2|3|4" | commandtoprint $ cat file 1 2 3 4 5 Need this without cat output (only 1 and 5). ~$ cat file | ...
3
votes
1answer
66 views

Concatenate in a PDF the first page of several odt files alphabetically

I have, in the same directory, several odt files. I'd like to have in one PDF document the first page of these odt files, sorted alphabetically based on their filename. For example, if I have these ...
5
votes
1answer
166 views

Command-line incremental backup tools

Which command line backup tool(s) has the best compression ratio? I want to backup my entire system, including media files, text files etc. I found this list on the Arch wiki site but I don't know ...
2
votes
1answer
53 views

How to transform a text file into a picture

If I have a plain text file, how can I convert it to an image file through the command line? (and preserve the layout of the ASCII art in it)
2
votes
2answers
177 views

Use output from head to copy files with spaces

I have 11 files with spaces in its name in a folder and I want to copy the newest 10. I used ls -t | head -n 10 to get only the newest 10 files. When I want to use the expression in a cp statement I ...
2
votes
2answers
45 views

Is it possible to obtain OS X versions of Unix tools on modern Linux distributions (like Ubuntu or RedHat)?

I have observed that there are often subtle and often annoying differences between the default versions of certain command line tools like paste and sed on modern distributions of Linux versus OSX. ...
2
votes
2answers
139 views

“cat” command: how to automatically escape everything that might be a violation?

If you copy the contents of httpd.conf and then paste it into a cat command.. such as this one.. #!/bin/bash cat > /test << EOF pasted here.. EOF you run into this error: -bash: ...
3
votes
2answers
349 views

change url of web browser thru command line?

Is there some way to change the current url (of current tab or an specific tab) of a running web browser (any) thru command line? It can be any browser that run on linux, preferably if it is light ...
2
votes
1answer
177 views

How to enable double tab autocompletion list in bash?

I've worked in Linux before where when I press tab it autocompletes until it becomes ambiguous. If I pressed tab twice at that point it would give me a list of all possible completions. My current ...
5
votes
1answer
140 views

Strange kind of “stealth” directory on Linux

I am in a Linux machine and am working with a directory that is aptly named "stealth", because it runs and hides! Take a look at this behavior: bash-3.2$ ls /net bash-3.2$ ls -la /net total 4 ...
1
vote
3answers
415 views

copying files with particular names to another folder

I have a folder with a lot of files. I want to copy all files which begin with of these names (separated by space): abc abd aer ab-x ate to another folder. How can I do that?
0
votes
1answer
224 views

Download all source files for a webpage

I want to download the source files for a webpage which is a database search engine. Using curl I'm only able to download the main html page. I would also like to download all the javascript files, ...
8
votes
3answers
1k views

Local, timestamped logging of all ssh commands?

How can I keep a local, timestamped record of all remote commands I use in ssh (command-line openssh client started through bash)? Requirements: Essential: 100% client-side without relying on ...
2
votes
0answers
33 views

rlwrap-like tool with command autocompletion

I am often using rlwrap sqlite database.sqlite to browse an SQLite table. It works great but I would like to have a tool that would create an index tables (and possible its columns as well) and let me ...
5
votes
1answer
329 views

What's the easiest way to resize an ext4 partition from the command line?

What's the easiest way to resize an ext4 partition (or any type partition depending on the method) from the command line (potentially with the fewest commands, but also the easiest to understand)? ...
0
votes
3answers
50 views

how to export all numbers that are unique in few text files into another file?

I have a.txt,b.txt,c.txt. Each has different numbers as below: a.txt: 12 14 111 1 15 2 b.txt 12 18 22 23 1 2 c.txt 12 14 15 16 17 1200 The output should contains all the numbers from ...
4
votes
2answers
57 views

NFS: share with all clients except one

I want to share a folder with all the network's clients except only one. This is my current /etc/exports file: /opt/resources *(rw,async) What should I add to prevent the client 192.168.1.24 ...
3
votes
2answers
451 views

Mounting Disk Image in Raw format [duplicate]

While Trying to mount a disk image in Raw(dd) format using the following command mount nps-2010-emails.dd /media/manu/ I get the following error message mount: you must specify the filesystem ...
5
votes
1answer
47 views

How to get rid of unnecessary lines in gnuplot

So I'm pretty new to using gnuplot, and my code looks like this: set isosamples 40 unset key set title "Radial Matrix Elements" set xrange [1:15] set yrange [1:15] set xlabel "n1*" set ylabel "n2*" ...
1
vote
0answers
59 views

Conversion of disk image from Encase (E01) to Raw format [closed]

I am trying to convert from EnCase to Raw format using instructions given on this page. The following takes place: manu@ubuntu:~/Downloads$ ewfexport nps-2010-emails.E01 The program 'ewfexport' is ...
4
votes
3answers
195 views

Achieving hexdump-like format, that includes binary strings, on the command line?

I really like hexdump, especially because you can define a custom format; say: $ echo -e '\x00\x01\x02\x03' | hexdump -v -e '1/1 "%_ad: "' -e '4/1 "%02X "' -e '1/1 " : "' -e '4/1 "%_p"' -e '1/1 "\n"' ...
0
votes
1answer
31 views

Mount a file collection in a linux environment

I am presently working as a summer intern. My first objective is, given a collection of files, recover and identify the file types present in it. To download sample pseudo-forensics data I have been ...
16
votes
10answers
2k views

Run two commands on one argument (without scripting)

How can I perform two commands on one input, without typing that input twice? For example, the stat command tells a lot about a file, but doesn't indicate its file type: stat fileName The file ...
3
votes
1answer
76 views

Compare two files strictly line-by-line, without insertions or deletions

I have two files that essentially contain a memory dumps in a hex format. At the moment I use diff to see if the files are different and where the differences are. However, this can be misleading when ...
1
vote
3answers
134 views

How to remove all FIFO files with a shell command

I can't find a shell command to remove all the FIFO files inside a directory. In fact, for the removal of directories, the rm command offers the options -d, --dir, but for FIFOs it offers no option. ...
3
votes
1answer
130 views

Get a Kerberos service ticket from the command line

I am in the process of debugging a Kerberos setup. I have a valid krb5.conf and I can call kinit USERNAME to get a Ticket Granting Ticket (TGT): Credentials cache: /root/krb5cc_root Default ...
1
vote
0answers
277 views

Copy files to parent directory using relative pathnames [closed]

If I'm in the current working directory of oxford. How would I copy outline.doc, and place it into the sample_dir directory using relative pathnames? I've tried cp outline.doc ../outline.doc
2
votes
1answer
248 views

Why did this command delete every package?

I was trying to get a Windows program to run on PlayOnLinux and after it didn't work I went to remove Wine with this command: sudo apt-get remove --purge wine* and without thinking I agreed ...
0
votes
0answers
91 views

RHEL & SUSE 2014 CPU & storage benchmarking tools

I have hundreds of Linux servers that we need to benchmark the CPU & Storage on. RAM & Networking would also be good. If possible I would to avoid installing a large suite, but not totally ...