Most Popular

1500 questions
161
votes
4 answers

How to add repository from shell in Debian?

In Ubuntu one can add a repository via following command - sudo add-apt-repository ppa:yannubuntu/boot-repair As Ubuntu is based on Debian code base, I was expecting that the same would work in Debian too, but it doesn't. What is the reason for…
161
votes
5 answers

What is a Superblock, Inode, Dentry and a File?

From the article Anatomy of the Linux file system by M. Tim Jones, I read that Linux views all the file systems from the perspective of a common set of objects and these objects are superblock, inode, dentry and file. Even though the rest of the…
161
votes
11 answers

How can I run a cron command with existing environmental variables?

How can I run a cron command with existing environmental variables? If I am at a shell prompt I can type echo $ORACLE_HOME and get a path. This is one of my environmental variables that gets set in my ~/.profile. However, it seems that ~/.profile…
cwd
  • 45,389
161
votes
9 answers

dd vs cat -- is dd still relevant these days?

I recently realized we can use cat as much as dd, and it's actually faster than dd I know that dd was useful in dealing with tapes where block size actually mattered in correctness, not just performance. In these days, though, are there situations…
kizzx2
  • 1,833
  • 2
  • 12
  • 9
161
votes
14 answers

How do I know if dd is still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little worried, as I was able to dd from the disk to the…
eckza
  • 2,179
160
votes
10 answers

How to remove an audio track from an mp4 video file?

I have an mp4 video file with multiple audio tracks. I would like to strip away the rest of the tracks and keep just one. How do I do this?
tshepang
  • 65,642
160
votes
2 answers

How do we specify multiple ignore patterns for `tree` command?

I need to print the directory structure of our production system and I would like to remove some specific directories from the tree? How do we specify multiple ignore patterns for tree command?
Bharat Sinha
  • 1,743
160
votes
9 answers

How do I remotely edit files via ssh?

I have to edit some files placed on some server I could reach via ssh. I would prefer to edit these files in customized vim on my workstation (I have not rights to change vim settings on remote server). Sometimes I would like to edit a file with…
Loom
  • 3,953
159
votes
5 answers

systemctl status shows : "State: degraded"

When I run systemctl status, I get State: degraded at the top, ● x230 State: degraded Jobs: 0 queued Failed: 1 units Since: Wed 2018-05-30 17:09:49 CDT; 3 days ago .... What's going on, and how do I fix it?
Evan Carroll
  • 30,763
  • 48
  • 183
  • 315
159
votes
5 answers

Download only format mp4 on youtube-dl

How can I use the download-dl to download video through url playlist only format mp4 instead format .mkv or .webm? I use this command to download videos: youtube-dl -itcv --yes-playlist https://www.youtube.com/playlist?list=.... The result this…
158
votes
2 answers

Any way to encode the url in curl command?

I have some url which has space in it's query param. I want to use this in curl, e.g. curl -G "http://localhost:30001/data?zip=47401&utc_begin=2013-8-1 00:00:00&utc_end=2013-8-2 00:00:00&country_code=USA" which gives out Malformed Request-Line As…
Aashish P.
  • 1,581
158
votes
4 answers

locate vs find: usage, pros and cons of each other

In Linux and Unix systems there are two common search commands: locate and find. What are the pros and cons of each? When one have benefits over the other?
m0nhawk
  • 2,627
158
votes
5 answers

How do I attach a terminal to a detached process?

I have detached a process from my terminal, like this: $ process & That terminal is now long closed, but process is still running, and I want to send some commands to that process's stdin. Is that possible?
Rogach
  • 6,303
158
votes
8 answers

Clone ownership and permissions from another file?

Is there a command or flag to clone the user/group ownership and permissions on a file from another file? To make the perms and ownership exactly those of another file?
user394
  • 14,404
  • 21
  • 67
  • 93
158
votes
8 answers

Simple way to create a tunnel from one local port to another?

I have a development server, which is only accessible from 127.0.0.1:8000, not 192.168.1.x:8000. As a quick hack, is there a way to set up something to listen on another port (say, 8001) so that from the local network I could connect…