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

learn more… | top users | synonyms (1)

3
votes
2answers
64 views

How to print a range of IP addresses with Linux seq command

How can I print a range of ip addresses on linux command line using the "seq" command? For eg: I need seq to print a range of ip from 10.0.0.1 to 10.0.0.23 . Seems like the period in between the ...
0
votes
0answers
15 views

od: Put offset n to n of a hexdump to a file in proper hexdump -C (hex+ASCII) format

I have a 155GB canonical hex+ASCII hexdump hexdump -C blah > dump.dp Then ran: strings dump.dp | grep -bo 'XXXX' > found.txt So now, that file contains the string's hex offset in the ...
3
votes
1answer
54 views

Run vsim from dmenu — it only works when directly invoked in the terminal

Works: vsim, sh -c vsim Doesn't work: echo "vsim" | sh, echo "vsim" | xargs -I {} sh -c "{}" I want to run ModelSim (vsim) with dmenu, which is triggered using xbindkeys. Details vsim is a ...
0
votes
1answer
75 views

How can I convert this excel file so that it is not only one row?

I've got an Excel file, shown in the picture below, and available for download here. What I need is to extract the variables under Item (Column B) and the values in column G. As a start, I tried ...
1
vote
1answer
44 views

Make parent directories while creating a new file

I am aware of the fact that mkdir -p /path/to/new/directory will create a new directory, along with parent directory (if needed ). If I have to create a new file, along with it's parent directories ...
18
votes
5answers
5k views

echo a file without the first and last lines

Is there a simple way I can echo a file, skipping the first and last lines? I was looking at piping from head into tail, but for those it seems like I would have to know the total lines from the ...
0
votes
2answers
6k views

Difference between ifconfig and ipconfig? [closed]

What is the difference between ifconfig and ipconfig? What do dhcpcd and ifconfig actually do?
0
votes
1answer
51 views

How to list down all useless or less used files or application in my linux server?

I want to clean cruft from my Oracle Linux server. For this, I need to know which application or directory isn't used or is hardly ever accessed. Is there any command or way to list directories or ...
12
votes
4answers
10k views

Sorting files according to size recursively

how to scan a folder recursively and find the largest files in the folder, and sort them by size. I have tried using ls -R -S but it tends to list the directories as well I need to scan the folders ...
5
votes
1answer
50 views

Printing webpage using browser via CLI

I want to automate printing. From URL in text file, the webpage is printed. I have tried using wget and the results are very inferior than when printed via browser. Somehow FF and Chromium both manage ...
6
votes
4answers
19k views

How can I embed subtitles into videos with ffmpeg?

I'm told it's possible to embed subtitles (.srt) into video files (.avi) using ffmpeg, but I can't find any mention of it in the man page. Is this possible? What command do I use?
-2
votes
2answers
48 views

How can I add lines in /etc/rc.conf

I followed this tutorial to install FreeBSD 10.1 and at the step where it says "Add the following lines to /etc/rc.conf" I must to add the following lines in there: hald_enable="YES" ...
1
vote
1answer
45 views

Ls -1 Command in linux on Ubuntu dosen't show details beside the name of each directory or file in the list? [closed]

I am using Ubuntu and when i issue this ls -1 command there is no details appear in-front of the directories and files names there is only a blank space ..what can cause this ?
0
votes
2answers
75 views

Unix grep confusion

I am doing an assignment for school and using putty to complete the assignment. The format of the assignment does not allow for much variation and thus only one answer is sufficient enough to allow me ...
31
votes
9answers
69k views

How do I make my pc speaker beep

Using bash, how can I make the pc speaker beep? Something like echo 'beepsound' > /dev/pcspkr would be nice.
1
vote
2answers
21 views

Trying to connect through cl

I am trying with: $ sudo iwconfig wlan0 essid mynetwork key 4bare2011 $ sudo iwconfig wlan0 essid mynetwork key 4bare2011 mode Managed and similar combinations. I'm using Ubuntu 14.04. The key ...
1
vote
1answer
58 views

What does `{\} {}` mean in `find` command?

Please explain this command in detail. I am using this command to find large files above 6MB and split in to 5MB chunks in the same folder. Then it removes the original files (larger than 6MB) in the ...
51
votes
6answers
6k views

When is xargs needed?

The xargs command always confuses me. Is there a general rule that can help me figure out when I need it? Consider the two examples below: $ \ls | grep Cases | less prints the files that match ...
2
votes
1answer
42 views

How can I know which organisation a special command line tool is belong to?

Frequently we use command line tools to do fancy things in UNIX like system; many of them have a manpage and typically we can know which orgnization/person owns the copyright. For example, on Mac OS X ...
0
votes
3answers
90 views

Simple way to extract value from HTML

I have a very simple html file with a value inside. Value is 57 in this case. <eta version="1.0"><value uri="/user/var/48/10391/0/0/12528" strValue="57" unit="%" decPlaces="0" ...
0
votes
2answers
25 views

why some programs needs -h and other no

I know that is not a exciting question, but yet I don't understand why some programs needs program -h and other program --help sometimes is very boring recognize it
0
votes
0answers
12 views

acoc: availability, similar projects and problems?

I am trying to work on a Linux project out of Linux From Scratch. The outcome is a Linux with dull command line and console. I tried to bring color to terminal and I hit some bits and pieces like ...
4
votes
2answers
467 views

Basic commands in Unix not working i.e: -bash: ls: No such file or directory

I'm new to Unix and in the process of installing a program for my dissertation I must have played with the PATH for the basic Unix commands such as ls. Every time I type ls and the directory name I ...
2
votes
1answer
17 views

extract bounding box dimensions for TrueType font

On Linux, I can easily extract the height / width / ascent / descent dimensions of Xorg fonts via xlsfonts, e.g. $ xlsfonts -ll -fn 9x15 | egrep 'bounds|max' bounds: width left right ...
0
votes
1answer
44 views

Need to know how to start some GUI programs from terminal to use XMoand

I'm training myself to use XMONAD or something of the sort, but in order to do that, I need to know, from terminal, how to open the following programs: Bluefish Editor Settings (I'm using Ubuntu but ...
2
votes
3answers
2k views

UNIX commands help - find

I'm trying to learn UNIX commands and I'm playing this game to learn and I'm really stuck at the moment. I'm in a server through ssh and the directory is full of random files and folders and the ...
1
vote
1answer
33 views

Converting unix command to windows [closed]

I have been provided a command to use in unix, however, I want to perfrom the same operation in windows. Is it possible ? It's a network configuration command that apparently interacts with a server ? ...
1
vote
1answer
107 views

How to round floating point numbers in shell?

How do I correctly round IEEE 754 floating point numbers on the command line? I want to specify the precision of the output number - the count of fractional digits. Rounding 6.66 to precision 1 ...
6
votes
4answers
210 views

Strip Filenames and Rename

What rename command can I use which will delete the present filenames in a directory and replace them with alphanumeric filenames? Such as gg0001, gg0002, et cetera? And I'd like the command to work ...
0
votes
1answer
28 views

elif command is throwing error [closed]

Hi is the below elif command correct? elif [[ "${FILECOMMAND}" = "" ] && [[ -f ${ZIPFILE} ]||[ -f ${ZIPFILE3} ]]] I am getting an error when I run it.
12
votes
5answers
71k views

How to determine Linux kernel architecture?

uname -m gives i686 and uname -m gives i686 i386 output in Red Hat Enterprise Linux Server release 5.4 (Tikanga) machine. I need to install Oracle Database 10g Release 2 on that machine. So, how can I ...
0
votes
2answers
76 views

how to run rm in background in terminal

I have the following command to delete files in a folder that are 15 days or older: find /var/www/App/app/var/sessions* -mtime +15 -exec rm {} \; what is the best way to speed this up and run it ...
6
votes
3answers
345 views

how do I remove all files in a folder except just some specified files?

I want to remove all files in a directory while leaving just some specified files, they don't have anything in common by name. How could I achieve that? For example, the file names I want to keep ...
3
votes
1answer
86 views

Estimate the size of the extracted files before extraction a `tar.gz` archive?

Before using tar to extract a .tar.gz archive, it is possible to get an estimate of how large the extracted files are in total?
1
vote
1answer
45 views

How to access Flash drives in CLI mode?

I have fedora 20 64bit and for unknown reason I cannot boot on graphical mode. I have very important files for my project there. How can I copy those files to my USB flash ? How can I find my USB in ...
1
vote
1answer
62 views

Simplest way of hashing passwords with multiple different hash algorithms [closed]

I have a large list of plaintext passwords stored in a file pwds.txt and would like to obtain the hashed version of these passwords under various different hash algorithms. I want one file for each ...
0
votes
2answers
40 views

can I use logical operators to remove all files that matches with one and/or other pattern in a single line?

I want to remove .txt or .csv files in a single line. What I have in my directory tachomi$ ls file1.csv file1.sql file1.txt file2.csv file2.sql file2.txt I only want .sql files so I want to ...
2
votes
1answer
81 views

shutdown program doesn't terminate after scheduling a shutdown

I'm having a bit of trouble with my home server (running Debian 7.7). When trying to schedule a shutdown, the following occurs: serverbox:~ $ sudo shutdown -h +10 Broadcast message from ...
3
votes
3answers
51 views

How to see manpage of previous command?

For example if I did a curl -F 'clbin=@some-image.jpg' https://clbin.com. How do I man curl easily?
3
votes
1answer
341 views

How to grep the output of cURL?

I need to retrieve the expiry date of an SSL cert. The curl application does provide this information: $ curl -v https://google.com/ * Hostname was NOT found in DNS cache * Trying ...
0
votes
1answer
34 views

Background a process and execute something with one command

Probably it would be easier to do just with a script, but I wonder why can't I do that with one command. What I have tried so far: $ (ls >/dev/null &) && echo $! 3135 $ (ls ...
1
vote
1answer
123 views

How To Send Terminal Commands To Remote Server After Connecting Via putty? [closed]

In order to listing all batch files and finding the required file from a directory, I am using windows script to connect to the linux server. I can able to connect by passing necessary parameters but ...
3
votes
4answers
23k views

How do I exit or cancel a bad bash command?

I expect to get some flak for this, but I can't find the answer anywhere. It seems like it should be so obvious. Sometimes, when I type a bad command in a bash terminal, the cursor just jumps down to ...
16
votes
4answers
1k views

Copy image from command-line to clipboard

Is there a way in a bash to copy a picture to the clipboard? For example if there is a picture mypic.png I want to have a command like clipcopy mypic.png such that I can go for example to inkscape ...
0
votes
0answers
15 views

Output of `iw list`: phy_x corresponds to what interface?

I have 2 interfaces wlan0 and wlan1. When I want to see the modes that support my cards I do iw list and I see phy0 and phy2. How do I know what information corresponds to what card? In other words, ...
62
votes
25answers
10k views

Quick directory navigation in the terminal

I would like to frequently switch between directories that are in totally unrelated paths, for example /Project/Warnest/docs/ and ~/Dropbox/Projects/ds/test/. But I don't want to type cd ...
0
votes
2answers
31 views

One SSH session one script multiple terminals no X [closed]

I have read other posts asking the same question in the answer was, run your script and have it like this: #!/bin/bash xterm -e command The problem is that I don't have X installed on that server, ...
14
votes
2answers
4k views

How to execute consecutive commands from history?

Suppose I want to execute a sequence of four commands that I have executed before. If the first one is 432 in the command-history, then I could do: $ !432; !433; !434; !435 I'm curious, is there a ...
13
votes
2answers
6k views

Break a large file into smaller pieces

How do I break a large, +4GB file into smaller files of about 500MB each. And how do I re-assemble them again to get the original file?
7
votes
1answer
101 views

How to filter any part of description or option from manpage

I want to get output of any desired description or option from a man page. Example: I want to get the description for the autoclean option from the apt-get man page: Please suggest a command, ...