Ubuntu :: Remove All Foldernames Which Contains Spaces In Desktop With A Single Command?
Jun 8, 2011How to remove all foldernames which contains spaces in Desktop with a single command?
View 7 RepliesHow to remove all foldernames which contains spaces in Desktop with a single command?
View 7 RepliesI have just switched to banshee as my media player and imported my films and music. Problem is, the video list is quite hard to read because all the video files have spaces in their names which are replaced by % signs, numbers and letters. I'm wondering if there is a command I can use in the directory that will automatically remove all the spaces from the filenames or better still, replace the spaces with hyphens or underscores?
View 6 Replies View RelatedI am reading the output of /proc/acpi/thermal_zone/ATF0/temperature in a program to read my CPU temp. I am using cat like the following:
Code:
#cat /proc/acpi/thermal_zone/ATF0/temperature
temperature: 49 C
I basically want to get rid of the spaces in between temperature and the actual temperature. Is there a command I can pipe the cat output to, to remove the spaces. I have seen suggestions for sed, or tr, but for some reason I cannot get them to work properly.
Im using this unix command(in a php file) to remove a certain string and then remove the whitespace left by that string. Unofrtunately in many cases, the files get completely erased. Is there a workaround?
Code
<?php
$dir = "./";
$rmcode = `find $dir -name "*.php"
[cod3e]....
What is the single command that will remove all 'other'permissions from all files and directories under /home.
Just starting to learn Linux.
i found in some thread that Swap space wasnt really necessary for RAM of over 1 GB, and true to it, i wasnt using using much of my 4GB allocated for swap ever so i deleted it ( dunno if it was wise, but didnt face any problems when i first deleted). today, i found out from another thread on a way to extend the size of /home directory if it was on a seperate mountpoint, and if space was available on my hard disk.
i just had 1 GB allocated to home directory and it used to fill up quite rapidly (due to cache from google chrome). I made a backup of my home directory contents, and i deleted the /home partition through the Disk utility. Somehow i couldnt combine the two unallocated spaces under a single partition why is that? (My plan was to combine that 1GB and the 4GB from the earlier swap space to use a 5GB home partition.) then i restarted and ever since i have been seeing the Grub error,and am not able to access my operating systems normally. GRUB Loading stage 1.5 Grub loading, please wait Error 15 . i am attaching the results.txt from my system obtained by booting through a liveCD. Something tells me that the way ive been following has been a roundabout one or a very inefficient one. how can i restore my system to normalcy
How could someone remove all double or more spaces from a group of words? Is there a GUI program or CLI method or both? Example: I like to turn this:
[Code]...
the preceding and trailing spaces around the commas in my CSV without destroying my address field. I'm new to regex and sed so this is probably easy but I just can't do it without destroying the Address section. I'm using vanilla Linux and sed 4.1.3I'm willing to use any regex or even awk if needed.
Example:
I need this
randall , dean, 11111 , 1309 Hillside Ave., Warsaw, VA , 23591
[code]....
I'm hoping that someone can help me, I need to remove spaces (not replace with underscores) from several thousand files on a system with cygwin.
Can I do this from the shell using rename or mv somehow?
need all spaces between two letters or a letter and a number exchanged for an underscore, but all spaces between a letter and other characters need to remain. One example for clarity:
Input:
force -- lamin 90 [label]
active A -- generation [label]
needed Output:
force -- lamin_90 [label]
active_A -- generation [label]
I tried solving this with sed but obviously s/ /_/g does not work, nor does any s/[a-zA-z0-9] [a-zA-z0-9]/[a-zA-z0-9]_[a-zA-z0-9]/g , because you just can't do this...
I am trying to run an scp command on my linux server, this is working fine, however I changed the output folder to one which has spaces and now when run, it's coming up saying SCP ambiguous target
Here's my string:
expect -c 'spawn scp -r /var/lib/asterisk/backups/Everyday/ administrator@192.1.1.1:
/Volumes/Data1/My Backup Folder/ ; expect assword ; send "MYPASSWORD " ; interact;'
I am trying to encode files via mencoder. The file name has spaces in it. "test file.mkv". When I manually type the command in the terminal, everything works. But when I use a bash script (I'm reading it from a file) it doesn't. It gives me
Code:
File not found: '"test'
Below is the bash script I wrote
Code:
#!/bin/bash
# For testing, we have already built a file list, so just use that.
# ls *.mkv>files.lst
exec 10<files.lst
let count=0
while read -u 10 FILE; do
LINE="mencoder -of lavf -lavfopts format=mp4 -vf scale=1024:-3 -ovc x264 -x264encopts crf=28:vbv_maxrate=1500:nocabac:global_header:bframes=0 -oac faac -faacopts br=160:mpeg=4:object=2:raw -channels 2 -srate 48000 "$FILE" -o test.mp4"
echo $LINE
exec $LINE
done
exec 10>&-
files.lst contains only a single line (no newline) with
Code:
test file.mkv
On a related note, when I was first trying this simply on the command line, I had a file that had a double exclamation point. I found out that that is a shortcut of some kind for the previous command. My kludge to get around this was to try to execute a single exclamation point as a command, then to change the double exclamation point to a quadruple exclamation point. Is there a proper way (escape sequence or something) to pass double exclamation points to a command?
One system send files to linux machine and it is name contains spaces and I tried to move it from one directory to other, but it show error:
Ex:-
mv -f file one file two
mv: target 'one' is not a directory
How do I access files with spaces from the command line?
for example I want to go to a file called "New File" and let's say is in Downloads/Books/(and here is the file)
how do I input the space since the command line doesn't recognize it?
Is it possible, in Linux, to rename a file from something without spaces to something containing spaces? I know I can create directories and files with spaces by doing:
mkdir "new dir" and:
touch "new file.txt"
I want to rename files from:
imgp0882.jpg to something like:
20091231 1243 some topic.jpg
And how would it look in a shell script that uses parameters like:
for i in *.jpg do
rename "$i" "$somepath/$mydate $mytime $mytopic$extension"
?
I'm new to Linux (using PCLinuxOS 2009.2), coming from Windows, and I've written myself a little shell script to download files from my camera and then automatically rename them according to a date-and-topic pattern. As you can guess by now, I'm stuck on the bit about renaming. If you want to see my script, here's a copy. I'm not using jhead for this renaming because that only works with JPEG files but I want a single solution for any media format including videos.
Is there an easy way to Remove a package and all packages it depends on without breaking other packages?
View 2 Replies View RelatedFirst problem:
apt-get --purge remove ubuntu-desktop
Reading package lists...
Building dependency tree...
Reading state information...
Package ubuntu-desktop is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I have installed Ubuntu desktop on Ubuntu Server to get Boinc manager running. Now I want to remove Ubuntu-desktop.
Second Problem: /etc/init.d/xorg start : No such file or directory When the server boots i get a blinking cursor.
I delete a particular file often. first I have to cd then I have to rm.Is there a way to do this on a single line?
example
cd ./ssh rm known_hosts
that doesn't but is there a way to do it?
Made the following bash script named trimsquote:
Code:
#!/bin/bash
IFS=$'
[code]...
I have a large text file that's formatted sort of like this:
Code:
foo bar
blah
[code]...
I have recently installed Ubuntu 10.10 Server onto a old PC. Everything seems to be working fine except that i can't tab the next command.Like when you are typingcd hom (Then you press tab and the 'e' appears.)When i double click tab I get a list of all the possible directories but I wont seem to work when I press it one time just to complete my command.Anyone got a clue how to fix this?(I am new to this community but I got to say i Love it. We use Ubuntu at our university and it rocks!)
View 3 Replies View RelatedIs there a way in SuSE 11.1 to have the conventional desktop, instead the plasma desktop? I thought that installing KDE 3.5 will fix it, but I was wrong. I really don't want to download back SuSE 11.0, just to have my old desktop layout. SuSE developers should at least leave it as an option than to force people to install it
View 2 Replies View RelatedCan I have two ubuntu desktop in a single installed ubuntu9.10 such that two desktop has different ipaddress?
View 5 Replies View RelatedI went to a help site because I wanted to install an IRC client named seamonkey. I followed the directions step by step, copy and pasting each and every command into my terminal command line as per the instructions. Every single command produced an error. Needless to say, I was unable to install it. What's even more frustrating is I can't even post the url for the site here so someone can see what commands I was using.
View 10 Replies View RelatedCan we set password for linux board's in non-interactive mode.I didn't find suitable option for this in man page.
View 1 Replies View RelatedWould like to know how to cat the below output.
Code:
grep userlist_file /etc/vsftpd/vsftpd.conf | cut -c15-
Below which is the output for above command.
[code]...
After installing xubuntu 9.10 and attempting to change double mouse click starts to single click, there is no difference.
Example:Applications tab, settings, file manger, Behavior and then select single mouse click instead of double mouse click, renders no change in behavior what-so-ever.
Anyone else experienced this?
I have a pretty powerful computer and GPU that I'd like to fully utilize.I've been using Linux for the better part of 10 years and I'd like to know (as I can't think of a way) how I can use a single PC as a desktop AND a media center.My vision would be to essentially have to separate workstations on one PC. My desk monitor will be station one (desktop) and my TV will be station two (media center)... both should work independently of each other as if neither knows the other exists.
View 2 Replies View RelatedI posted a blog on how to install 64 bit adobe flash plugin in Ubuntu Lucid in a single command
[URL]
The command is
sudo aptitude remove flashplugin-nonfree flashplugin-installer && mkdir -p flashplugin-64 && cd flashplugin-64 && wget -c http://download.macromedia.com/pub/l..._091510.tar.gz && tar xzf flashplayer_square_p1_64bit_linux_091510.tar.gz && sudo cp libflashplayer.so /usr/lib64/mozilla/plugins/
I've been searching high and low for a solution to my problem, and have not had much luck as to yet!The situation is: I have two files containing bits of info that both need to be included in a single command, such as a for loop, but as separate elements. What I need to do is basically this:Code:ssh <servers in list a> ls -la | grep <items in list b>Does anyone have any thoughts on how I might do this? Is it possible to do using bash scripting alone?
View 3 Replies View Related