diff --git a/inc/newlib/devman.h b/inc/newlib/devman.h
index 8825994..be54275 100644
--- a/inc/newlib/devman.h
+++ b/inc/newlib/devman.h
@@ -60,6 +60,7 @@ typedef struct
   int ( *p_closedir_r )( struct _reent *r, void* dir, void *pdata );
   const char* ( *p_getaddr_r )( struct _reent *r, int fd, void *pdata );
   int ( *p_mkdir_r )( struct _reent *r, const char *pathname, mkdir_mode_t mode, void *pdata );
+  int ( *p_unlink_r )( struct _reent *r, const char *pathname, void *pdata );
 } DM_DEVICE;
 
 // Additional registration data for each FS (per FS instance)
diff --git a/src/mmcfs.c b/src/mmcfs.c
index a8e54e4..b7880af 100644
--- a/src/mmcfs.c
+++ b/src/mmcfs.c
@@ -275,6 +275,11 @@ static int mmcfs_mkdir_r( struct _reent *r, const char *name, mkdir_mode_t mode,
   return f_mkdir( name );
 }
 
+static int mmcfs_remove_r( struct _reent *r, const char *name, void *pdata )
+{
+  return f_unlink( name );
+}
+
 // MMC device descriptor structure
 static const DM_DEVICE mmcfs_device =
 {
@@ -287,7 +292,8 @@ static const DM_DEVICE mmcfs_device =
   mmcfs_readdir_r,      // readdir
   mmcfs_closedir_r,     // closedir
   NULL,                 // getaddr
-  mmcfs_mkdir_r         // mkdir
+  mmcfs_mkdir_r,        // mkdir
+  mmcfs_remove_r        // remove
 };
 
 int mmcfs_init()
diff --git a/src/newlib/genstd.c b/src/newlib/genstd.c
index 1491e3d..c743e93 100644
--- a/src/newlib/genstd.c
+++ b/src/newlib/genstd.c
@@ -143,7 +143,8 @@ static const DM_DEVICE std_device =
   NULL,                 // readdir
   NULL,                 // closedir
   NULL,                 // getaddr
-  NULL                  // mkdir
+  NULL,                 // mkdir
+  NULL,                 // unlink
 };
 
 int std_register()
diff --git a/src/newlib/stdtcp.c b/src/newlib/stdtcp.c
index 62fa7f6..285392f 100644
--- a/src/newlib/stdtcp.c
+++ b/src/newlib/stdtcp.c
@@ -94,7 +94,8 @@ static const DM_DEVICE std_device =
   NULL,                 // readdir
   NULL,                 // closedir
   NULL,                 // getaddr
-  NULL                  // mkdir
+  NULL,                 // mkdir
+  NULL                  // unlink
 };
 
 
diff --git a/src/newlib/stubs.c b/src/newlib/stubs.c
index 342ce46..e57f23e 100644
--- a/src/newlib/stubs.c
+++ b/src/newlib/stubs.c
@@ -186,7 +186,7 @@ _ssize_t _write_r( struct _reent *r, int file, const void *ptr, size_t len )
 int _mkdir_r( struct _reent *r, const char *path, mkdir_mode_t mode )
 {
   char* actname;
-  int res, devid;
+  int devid;
   const DM_INSTANCE_DATA *pinst;
 
   // Look for device, return error if not found or if function not implemented
@@ -212,6 +212,36 @@ int mkdir( const char *path, mode_t mode )
 }
 
 // ****************************************************************************
+// _unlink_r
+int _unlink_r( struct _reent *r, const char *path )
+{
+  char* actname;
+  int devid;
+  const DM_INSTANCE_DATA *pinst;
+
+  // Look for device, return error if not found or if function not implemented
+  if( ( devid = find_dm_entry( path, &actname ) ) == -1 )
+  {
+    r->_errno = ENODEV;
+    return -1;
+  }
+  pinst = dm_get_instance_at( devid );
+  if( pinst->pdev->p_unlink_r == NULL )
+  {
+    r->_errno = EPERM;
+    return -1;
+  }
+
+  // Device found, call its function
+  if( pinst->pdev->p_unlink_r( r, actname - 1, pinst->pdata ) != 0 )
+  {
+    r->_errno = EIO;
+    return -1;
+  }
+  return 0;
+}
+
+// ****************************************************************************
 // Miscellaneous functions
 
 int _isatty_r( struct _reent* r, int fd )
@@ -245,12 +275,6 @@ clock_t _times_r( struct _reent* r, struct tms *buf )
   return 0;
 }
 
-int _unlink_r( struct _reent *r, const char *name )
-{
-  r->_errno = ENOSYS;
-  return -1;
-}
-
 int _link_r( struct _reent *r, const char *c1, const char *c2 )
 {
   r->_errno = ENOSYS;
diff --git a/src/shell.c b/src/shell.c
index 8de8a1b..60867ca 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -67,10 +67,13 @@ static void shell_help( int argc, char **argv )
   printf( "  help        - print this help\n" );
   printf( "  ls or dir   - lists filesystems files and sizes\n" );
   printf( "  cat or type - lists file contents\n" );
+  printf( "  rm          - remove a file or directory\n" );
+  printf( "  clear       - clear the eLua terminal\n" );
   printf( "  lua [args]  - run Lua with the given arguments\n" );
   printf( "  recv [path] - receive a file via XMODEM. If path is given save it there, otherwise run it.\n");
   printf( "  cp <src> <dst> - copy source file 'src' to 'dst'\n" );
   printf( "  wofmt       - format the internal WOFS\n" );
+  printf( "  mkdir       - create a directory\n" );
   printf( "  ver         - print eLua version\n" );
 }
 
@@ -296,7 +299,30 @@ static void shell_cat( int argc, char **argv )
     else
       printf( "Unable to open '%s'\n", argv[ i ] );
   }
-}    
+}   
+
+// 'rm' handler
+static void shell_rm( int argc, char **argv )
+{
+  unsigned i;
+
+  if( argc < 2 )
+  {
+    printf( "Usage: rm <filename1> [<filename2> ...]\n" );
+    return;
+  }
+  for( i = 1; i < argc; i ++ )
+  {
+    if( remove( argv[ i ] ) != 0 )
+      printf( "Unable to remove '%s'\n", argv[ i ] );
+  }
+}
+
+// 'clear' handler
+static void shell_clear( int argc, char **argv )
+{
+  term_clrscr();
+}
 
 // 'copy' handler
 #ifdef BUILD_RFS
@@ -409,6 +435,8 @@ static const SHELL_COMMAND shell_commands[] =
   { "ls", shell_ls },
   { "dir", shell_ls },
   { "cat", shell_cat },
+  { "rm", shell_rm },
+  { "clear", shell_clear },
   { "type", shell_cat },
   { "cp", shell_cp },
   { "wofmt", shell_wofmt },
