0

I was trying to change the name of my portable HDD from terminal. usually the rename command is used or sometimes mv.

I am getting this error.

/media/dishank$ rename virus\ BOX/ virus_box virus\ BOX/
Search pattern not terminated at (eval 1) line 1.
αғsнιη
  • 35,660

2 Answers2

2

man -k label | grep -E 'file|volume'

should print the names of a few relevant shell commands.
Check out the man pages.
You will probably need to prepended with sudo as you attempt to run any of them.

NOTE:
rename - renames multiple files
rm - remove files or directories
mv - move files

Hannu
  • 5,374
  • 1
  • 23
  • 40
2

I followed following steps:

  1. Need to find the path of media device. mine was /dev/sdc1 (use Gparted to find)
  2. unmount the partition (do not disconnect it physically). ex: sudo umount /dev/sdc1
  3. mine is ntfs so. sudo ntfslabel /dev/sdc1 virus_box and mount back your device.
  4. verify changes through sudo blkid

All is done.

For more info link

αғsнιη
  • 35,660