Skip to main content
Filter by
Sorted by
Tagged with
423 votes
21 answers
397k views

So, if I'm in my home directory and I want to move foo.c to ~/bar/baz/foo.c , but those directories don't exist, is there some way to have those directories automatically created, so that you would ...
Paul Wicks's user avatar
  • 66.2k
411 votes
8 answers
620k views

I am hosting special HTTP and HTTPS services on the ports 8006 and 8007 respectively. I use iptables to "activate" the server; i.e. to route the incoming HTTP and HTTPS ports: iptables -A INPUT -i ...
Jeroen Ooms's user avatar
  • 33.3k
410 votes
3 answers
803k views

How is it possible to change the default shell? The env command currently says: SHELL=/bin/tcsh and I want to change that to Bash.
mahmood's user avatar
  • 25.2k
403 votes
8 answers
366k views

Is it possible to get the start time of an old running process? It seems that ps will report the date (not the time) if it wasn't started today, and only the year if it wasn't started this year. Is ...
ajwood's user avatar
  • 19.2k
400 votes
9 answers
424k views

I want to use subprocess.check_output() with ps -A | grep 'process_name'. I tried various solutions but so far nothing worked. Can someone guide me how to do it?
zuberuber's user avatar
  • 4,121
396 votes
31 answers
1.6m views

I'm trying to upgrade to the latest version of node. I'm following the instructions at http://davidwalsh.name/upgrade-nodejs But when I do: sudo npm install -g n I get the error: sudo: npm: command ...
Mark's user avatar
  • 5,178
395 votes
5 answers
266k views

I have been involved in some debate with respect to libraries in Linux, and would like to confirm some things. It is to my understanding (please correct me if I am wrong and I will edit my post later),...
Cloud's user avatar
  • 19.5k
392 votes
22 answers
478k views

I have a crontab running every hour. The user running it has environment variabless in the .bash_profile that work when the user runs the job from the terminal, however, obviously these don't get ...
James's user avatar
  • 15.6k
388 votes
10 answers
435k views

I'm using find to all files in directory, so I get a list of paths. However, I need only file names. i.e. I get ./dir1/dir2/file.txt and I want to get file.txt
marverix's user avatar
  • 7,765
387 votes
2 answers
206k views

When using grep in Linux, the result often contains a lot of "binary file XXX matches", which I do not care about. How to suppress this part of the results, or how to exclude binary files in ...
RandyTek's user avatar
  • 4,864
378 votes
22 answers
1.7m views

I am having trouble compiling and running my Java code, intended to allow me to interface Java with a shared object for Vensim, a simulation modeling package. The following code compiles without ...
Dave's user avatar
  • 3,819
374 votes
10 answers
578k views

I need to recursively search for a specified string within all files and subdirectories within a directory and replace this string with another string. I know that the command to find it might look ...
billtian's user avatar
  • 6,891
372 votes
7 answers
579k views

E.g., a MySQL server is running on my Ubuntu machine. Some data has been changed during the last 24 hours. What (Linux) scripts can find the files that have been changed during the last 24 hours? ...
JackWM's user avatar
  • 10.7k
367 votes
13 answers
556k views

I have a boto3 client : boto3.client('kms') But it happens on new machines, They open and close dynamically. if endpoint is None: if region_name is None: # Raise a more ...
WebQube's user avatar
  • 9,011
364 votes
7 answers
432k views

I know how to use rpm to list the contents of a package (rpm -qpil package.rpm). However, this requires knowing the location of the .rpm file on the filesystem. A more elegant solution would be to use ...
Lorin Hochstein's user avatar
362 votes
26 answers
450k views

I want to create a near 100% load on a Linux machine. It's quad core system and I want all cores going full speed. Ideally, the CPU load would last a designated amount of time and then stop. I'm ...
User1's user avatar
  • 41.6k
362 votes
11 answers
573k views

I am trying to merge multiple linux commands in one line to perform deployment operation. For example cd /my_folder rm *.jar svn co path to repo mvn compile package install
d-man's user avatar
  • 58.2k
358 votes
18 answers
408k views

Is there a Linux command that will list all available commands and aliases for this terminal session? As if you typed 'a' and pressed tab, but for every letter of the alphabet. Or running 'alias' but ...
ack's user avatar
  • 15.2k
357 votes
19 answers
186k views

On a Linux machine I would like to traverse a folder hierarchy and get a list of all of the distinct file extensions within it. What would be the best way to achieve this from a shell?
GloryFish's user avatar
  • 13.4k
354 votes
14 answers
934k views

I'm running Ubuntu 9:10 and a package called M2Crypto is installed (version is 0.19.1). I need to download, build and install the latest version of the M2Crypto package (0.20.2). The 0.19.1 package ...
thompson's user avatar
  • 3,559
353 votes
10 answers
178k views

When using grep, it will highlight any text in a line with a match to your regular expression. What if I want this behaviour, but have grep print out all lines as well? I came up empty after a quick ...
Martin Konecny's user avatar
352 votes
13 answers
416k views

Is it possible in Linux command line to have a command repeat every n seconds? Say, I have an import running, and I am doing ls -l to check if the file size is increasing. I would like to have a ...
Marty Wallace's user avatar
352 votes
12 answers
538k views

I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI ...
Brock Woolf's user avatar
  • 47.4k
349 votes
11 answers
649k views

I'm trying to figure out how to run a crontab job every week on Sunday. I think the following should work, but I'm not sure if I understand correctly. Is the following correct? 5 8 * * 6
dev_fight's user avatar
  • 3,545
347 votes
12 answers
613k views

I'm trying to ftp a folder using the command line ftp client, but so far I've only been able to use 'get' to get individual files.
Charles Ma's user avatar
  • 49.6k