sylvaine: Dark-haired person with black eyes & white pupils. (Default)
Sylv ([personal profile] sylvaine) wrote in [community profile] linux4all2012-01-05 09:07 pm

clearing disk space in CLI?

Whilst trying to get my GUI back, I got the error message "Keyboard initialisation failed. This could be a missing or incorrect setup of xkeyboard-config.", which google tells me means I need to free up disk space.

As far as I know, I need to use the rm command to do this, but how do I figure out which files to delete without my GUI? I'm deathly afraid that I'll delete something I need.

(Please bear in mind that I'm an utter noob when it comes to Linux.)
vass: Small turtle with green leaf in its mouth (Default)

[personal profile] vass 2012-01-05 08:50 pm (UTC)(link)
ls is the command to view the files in a directory.
pwd tells you which directory you're currently in.
cd changes directory.

Suppose you were in a directory called /foo. You typed ls and found out that there were three directories in /foo - hat, ball, and cup. You want to go to cup. So you type cd cup.

To move up to the directory above the one you're in, you type cd .. So, if you were in /ball, cd .. would take you to /foo.

cd / will take you to the root of your filesystem, the directory all the other directories are in.
vass: Small turtle with green leaf in its mouth (Default)

[personal profile] vass 2012-01-05 08:52 pm (UTC)(link)
man [command] gives you the instruction manual for a command. So man ls will tell you how to use ls.

Be very careful with rm. Read the manual first.
vass: Small turtle with green leaf in its mouth (Default)

[personal profile] vass 2012-01-05 08:53 pm (UTC)(link)
Also: if it's in your filesystem (anything except for your home directory) then don't delete it.