Here's a handful of some really useful terminal commands that might make your life considerably easier.
Ctrl + a
Move to the start of the command line on the terminal.
Ctrl + d
Log out from the terminal (when the command line is empty).
This can also complete the current running process (for example, when decrypting in GPG).
!abc
Execute the last command in history beginning with abc.
tty
Prints the name of the terminal in which you are typing this command.
time
Determine the amount of time that it will take for a process to complete.
who
Determine the details of users who have logged onto the machine.
free
Raw information about memory on the disk.
Showing posts with label terminal. Show all posts
Showing posts with label terminal. Show all posts
Tuesday, 24 March 2015
Monday, 23 March 2015
Mythbusters - Is Linux hard to use?
Linux suffers a little bit of a perception problem. When most Windows or Mac users picture a Linux desktop they imagine something looking a little like this:
Big boring command lines and indecipherable text that only the nerdiest nerd could possibly interpret.
Sunday, 14 July 2013
How to install a Tar.gz file (or Tar.bz2 file) Easily
1. Extract your file into a folder such as your documents.
2. Read the Install text or Readme to see if there are any specific instructions or requirements for your package.
3. Make that directory your central directory using the cd command in the terminal.
For example, for one extracted in your documents.
4. Run command: ./configure
This should also tell you if there are any dependencies which are required to be installed.
5. Run command: make
6. Run command: sudo make install
2. Read the Install text or Readme to see if there are any specific instructions or requirements for your package.
3. Make that directory your central directory using the cd command in the terminal.
For example, for one extracted in your documents.
cd /home/username/Documents/YourExtract4. Run command: ./configure
This should also tell you if there are any dependencies which are required to be installed.
5. Run command: make
6. Run command: sudo make install
Tuesday, 25 June 2013
Find a File by its Contents (uBuntu Contents Search)
So you can find a file by it's name pretty easily using Nautilus but how do you search for it's contents?
Enter the following code in the terminal:
Enter the following code in the terminal:
grep -lir "search text" /path/to/directory
And it'll return a list of files containing your search terms within them.
Labels:
12.10,
13.04,
content search,
files containing,
search,
terminal,
ubuntu
Monday, 27 May 2013
An Idiots Guide to Installing Truecrypt Quickly and Easily in uBuntu 12.04+
So Truecrypt isn't available in the software centre any more which is a bit of a pain but it's one of those bits of software you can't really do without.
Not to worry.
1. Open up the terminal and type:
For 32bit systems...
Or for 64bit systems...
2. Extract it...
3. And install it...
And your done!
Not to worry.
1. Open up the terminal and type:
For 32bit systems...
wget http://www.truecrypt.org/download/truecrypt-7.1a-linux-x86.tar.gz Or for 64bit systems...
http://www.truecrypt.org/download/truecrypt-7.1a-linux-x64.tar.gz2. Extract it...
tar -zxvf truecrypt*.gz3. And install it...
sudo ./truecrypt-7.1a-setup-x86 And your done!
Sunday, 28 April 2013
Determine the size of each individual file in a folder from Terminal: ls -l
So for some reason you've got a folder with loads of files in it and you want to find out their contents using the terminal. The solution is quite easy.
1. Enter sudo -i & your password to prevent any annoying permission denied messages.
2. Enter ls -l /home/yourname/folder or whatever the path to your folder is.
And that's it. Easy.
1. Enter sudo -i & your password to prevent any annoying permission denied messages.
2. Enter ls -l /home/yourname/folder or whatever the path to your folder is.
And that's it. Easy.
Quickly Cut and Trim Any Video File
So you've got this video file that's taking up a lot of space. You've noticed it's 2-3 hours long but really you only need 20-30 minutes of it. This is going to show you how to chop it up.
Open the terminal and enter this command, changing (00:15:00 -t 00:45:23) to whatever length you're looking for and original.mp4 & output.mp4 as appropriate.
So that command above would take the original.mp4 file and create a smaller output.mp4 file consisting of original.mp4's 15 minute mark to 45 minute 23 mark.
If you prefer a GUI can also do this using AviDemux available from the software centre but from my experience this takes a longgg time (it needs to build the file - or something) whereas in the terminal it takes a matter of seconds.
Open the terminal and enter this command, changing (00:15:00 -t 00:45:23) to whatever length you're looking for and original.mp4 & output.mp4 as appropriate.
ffmpeg -acodec copy -vcodec copy -ss 00:15:00 -t 00:45:23 -i original.mp4 output.mp4
So that command above would take the original.mp4 file and create a smaller output.mp4 file consisting of original.mp4's 15 minute mark to 45 minute 23 mark.
If you prefer a GUI can also do this using AviDemux available from the software centre but from my experience this takes a longgg time (it needs to build the file - or something) whereas in the terminal it takes a matter of seconds.
Subscribe to:
Posts (Atom)
